Jump to content
  • Advertisement
Sign in to follow this  
Calixte

Rotation matrix

This topic is 4810 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, I would like to rotate an object under openGL without using glRotate (because I use another representation than Euler angles). I have a 3 by 3 rotation matrix (that I can set to homogeneous 4 by 4) and I would like to rotate my object. How to do that? Thanks, c.

Share this post


Link to post
Share on other sites
Advertisement
you simply call glMultMatrix{f|d} and pass it a pointer to the internal matrix data, also it must be a column-major matrix ie consective elements should be one "below" the preceding one.

that is memory should be laid out like this

00 04 08 12
01 05 09 13
02 06 10 14
03 07 11 15

where the numbers represent the linear offset.

if you're unsure on your current layout I would bet that you need to transpose it.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!