Rotation matrix

Started by
0 comments, last by DigitalDelusion 18 years, 10 months ago
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.
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.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats

This topic is closed to new replies.

Advertisement