   Matrix rotation/translation [solved]
  I have a matrix that was constructed by multiplying a rotation by a translation, so if you were to apply this matrix to a square of vertices, these vertices would be rotated around the translated point (rather than moving to the translated point and then rotating).What matrix would I then use to rotate further around that same point?  Would I have to remove the translation, rotate further and then reapply the translation?  Or is there a matrix I can construct which simply does it in one matrix multiply?Thanks[Edited by - RobMaddison on May 17, 2010 2:43:52 AM]
  You should just be able to choose carefully which side of the x the second roation matrix is on.If RxT means "Rotate around the origin, then translate to a point", then R2xR1xT means "Rotate(2) around the origin, then roatate(1) around the origin, then translate to a point".   ;  You can always "do it in one".If you have a decent set of matrix routines you should be able to build them up in a matrix in exactly the same way you'd apply them to a model individually.A lot of math libraries have "pre" and "post" tacked onto the various method names to signify that "this is to be applied before the previous transform or after it" which is what you described.The under the hood implementation of pre and post is usually just changing the order of the multiplies. So  A = B*C would be a "pre" where A = C*B would be the "post".   ;  Perfect, thanks guys   