The question is about 3D model rotation and rendering. I have a model exported from 3D Modelling software. It is defined in its model coordinate system. I put it in a world coordinate system when doing rendering.
In my current code, I call setRotation (input are Euler angles) function of the model object to rotate it. It turns out that the model is rotated alone 3 axes (in an order) around origin of model coordinate system.
Now, I want it to be rotated arount a pivot point other than its origin. I think I should call setRotation at first and then use an additional setTranslation to move it to the correct position caused by the pivot point. My question is:
As
setRotationalways rotates the model around its origin (not pivot point), how can I figure out the Euler angles for the first-stepsetRotation(described above) call?How to figure out the Translation vector for second-step
setTranslation?
I want to know: if a model rotated around a pivot point with a set of euler angles results in the SAME attitude (position do not care) by rotating it around the origin with that set of euler angles?