Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DraK

How do you implement this?

This topic is 5932 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

Hi, well I''m writting a game engine (surprise!) and I have a question that don''t let me sleep. I have a class that encapsulates a Mesh. So, now I have to choose: how I store the orientation of my mesh? I see two ways: - Keeping the euler angles: rotation around the 3 local axises. So I could rotate the object unsing something like: rotateX(rotx); rotateY(roty); rotateZ(rotz); The problem is that the order of rotation is significant another problem: I have to rotate the mesh around its local axises, and I don''t know why (any ideas?). - The other way could be keeping the object''s transform matrix, annd instead of having three angles I''d have 3 vectors determining the orientation of the local axises. The question is: What is the best way to do that? How do you implement that? Any idea to rotate my object locally?? Thanx.

Share this post


Link to post
Share on other sites
Advertisement
Storing a matrix would work, but you would slowly accumulate errors due to rounding. You can fix that by occasionally recalibrating them. I recommend you research quaternions.

Share this post


Link to post
Share on other sites
I''ll research quaternions, but there is any other method? How do you implemented that?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!