Jump to content
  • Advertisement
Sign in to follow this  
giftofsky

OpenGL How to get 3 Euler angles for few set of subsequence rotation?

This topic is 4908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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~

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You're trying to solve the wrong problem. Read up on matrices.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!