JBenghiat Posted February 28, 2021 Share Posted February 28, 2021 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 Link to comment
PatW Posted February 28, 2021 Share Posted February 28, 2021 (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, 2021 by PatW Quote Link to comment
Nicolas Goutte Posted March 1, 2021 Share Posted March 1, 2021 (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, 2021 by Nicolas Goutte Quote Link to comment
JBenghiat Posted March 7, 2021 Author Share Posted March 7, 2021 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 Link to comment
Nicolas Goutte Posted March 8, 2021 Share Posted March 8, 2021 (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, 2021 by Nicolas Goutte Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.