JBenghiat 370 Posted February 28 I always get a little turned around choosing the before or after version of a transformation on a VWTransformationMatrix, e.g. RotateXBefore vs RotateXAfter. I had thought maybe Before applies to pre-multiplication and After applies the post-multiplication, but the opposite seems to be true: Before applies to the object axes and After applies to the global axes. Does anyone know what the before and after terms actually apply to? 1 Quote Share this post Link to post
PatW 18 Posted February 28 (edited) It means apply rotation before applying the offset. Addition: Rotations use always the 0,0,0 as anchor. Whne you want to rotate some object about his own axis you would have to move it first with the axis on 0,0,0 then rotate and move it back where it was. This step is saved by the RotateBefore function. regards, Patrick Edited March 1 by PatW Quote Share this post Link to post
Nicolas Goutte 84 Posted March 1 (edited) Transformations (mathematically matrices) are not commutative. That is the reason of "before" and "after". Otherwise said: making transformation A, then transformation B is not the same as making transformation B first and then A. Edited March 1 by Nicolas Goutte Quote Share this post Link to post
JBenghiat 370 Posted March 7 On 3/1/2021 at 3:43 AM, Nicolas Goutte said: Transformations (mathematically matrices) are not commutative. That is the reason of "before" and "after". Thats what I thought initially, but VW applies the transformation to the matrix immediately, so it’s the order of the calls that matters, not the before/after designation. The designations seem to determine pre- or post- multiplication, but as far as I can tell, “After” pre multiplies and “Before” post multiplies. http://web.cse.ohio-state.edu/~wang.3602/courses/cse5542-2013-spring/6-Transformation_II.pdf Quote Share this post Link to post
Nicolas Goutte 84 Posted March 8 (edited) 17 hours ago, JBenghiat said: Thats what I thought initially, but VW applies the transformation to the matrix immediately, so it’s the order of the calls that matters, not the before/after designation. That has not to have with immediately. It just to have if one transformation has to be done before or after another. As I have written above that is not the same. Quote The designations seem to determine pre- or post- multiplication, but as far as I can tell, “After” pre multiplies and “Before” post multiplies. http://web.cse.ohio-state.edu/~wang.3602/courses/cse5542-2013-spring/6-Transformation_II.pdf Yes sure, for "after"you have to be on the left side, for "before" on the right side of the multiply. (The vector you transform is always the far right side the matrix formula.) Edited March 8 by Nicolas Goutte Quote Share this post Link to post