Rotation matrix
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement