Advertisement

Question about matrix world rotation

Started by January 31, 2003 01:00 PM
0 comments, last by Kiz 22 years ago
Ok, here''s a newbie question... I have a kind of my own engine where I can load multiple objects to world, move them around, rotate them, play with camera e.t.c... Every object in the world has its "world" matrix which I modify when i move/rotate object in the world. The same matrix i mult. with OpenGL-s matrix before displaying my objects. The question that bothers me is how do I rotate my objects around world axsis translated to object coordinate? So actually I need some matrix math solved because I don''t want my rotation axis to rotate with object. Another simplification of my problem is: How to rotate already rotated matrix but just about "world axis X, Y, Z" translated to object position. I''m sure this is a simple matter but my math is somewhat weak.
Kiz
Gosh, it''s been a long time since I dealt with this one. The answer to your problem is quite simple. There is a 3x3 matrix which the elements of it are cosine and sine. It''s in every linear algebra text book. If you have more question, let me know.

This topic is closed to new replies.

Advertisement