0

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:

  1. As setRotation always rotates the model around its origin (not pivot point), how can I figure out the Euler angles for the first-step setRotation (described above) call?

  2. 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?

4
  • Possible duplicate of Rotation around a pivot point with OpenGL Commented Mar 13, 2018 at 12:50
  • Not exactly the same. I want to figure out whether first-step rotation shares the same Euler angles (with origin based rotation). Commented Mar 13, 2018 at 13:48
  • Even if that's the case, your question doesn't align with SO format. How do you want people to guess what's going on in your transformations if you show no code? Commented Mar 13, 2018 at 13:52
  • OK, I try to make my question more understandable Commented Mar 13, 2018 at 13:57

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.