How to get 3 Euler angles for few set of subsequence rotation?
Hello, i'm new bies in opengl & game dev. I'm working on a small 3D program currently, & am stuck with rotation angle stuff. Below is my question:
If a obj that subsequently apply few set of rotation(in x, y, z axes), how do i get 3 single x, y, z rotation angle to represent that?
example: A grouped obj that its primitives has its own rotation angle, & whole group has another rotation angle. But, is that able to get 3 x,y,z rotation angle to represent that instead of need to call glRotate for 6 times (6 angles)?
TQ for your attention to beginner!! :>
~giftofsky~
giftofsky, what AP is probably trying to say is that it's a bad idea to represent and maintain complex rotations as a set of Euler angles. You can do it, but the math is tricky and prone to numerical error. Instead, you should use a different representation for your rotation; matrix, axis-angle, or quaternion would all work. There's plenty of articles around--including in the "articles" section of this site--about using quaternions to represent rotations; I suggest you look at some of them.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement