If all the functions AffineMat3f(), Translate(p), Rotate(r), Scale(s,s) return an object of the same type, then that's possible. The chained methods act on the returned value from the previous function/method, so whatever they return must have these methods.
That's the reason why often functions that mutate the input object also return it (which might seem like an unnecessary redundancy, but only like this, chaining is possible)