
3DSMAX rotation export problems
Hi, I''m a novice intro coder and i''m developing a 3DStudio MAX primitive geometry exporter. I don''t need the vertices or faces info, only which type of geometry I''m reading (box,sphere,cone...) and the parameters to recreate it in my engine (Height,width,num.segments). Now I take all this one and it''s ok but, for example, when I create a cone in MAX if I use the front/top/right window the cone appears rotate according with different angles. So I extract the quaternion of this object, and the position. And then in my engine I make the translation and get rotation matrix from the quaternion and mult by the actual object matrix. But it not look good
And I don''t know if I must make something special with the quat that I read from MAX. Can anyone help me?

ok
a quat is stored in max as:
this is not the angle of rotation and the axis of rotation. you get that from:
you can then pass this to glRotatef(angle, anis.x, axis.y, axis.z); to do the correct rotation. also i think you need to rotate and translate in the oposate directions or something??
hope this helps you!
- Jono AH
[edited by - jonox on January 4, 2003 6:49:34 AM]
a quat is stored in max as:
<quat>.w : Float <quat>.x : Float <quat>.y : Float <quat>.z : Float quaternion complex components as Floats
this is not the angle of rotation and the axis of rotation. you get that from:
<quat>.angle : Float <quat>.axis : Point3 derived properties - an angle in degrees and a rotation axis
you can then pass this to glRotatef(angle, anis.x, axis.y, axis.z); to do the correct rotation. also i think you need to rotate and translate in the oposate directions or something??
hope this helps you!
- Jono AH
[edited by - jonox on January 4, 2003 6:49:34 AM]
- JonoRule #1: If you build it, they will come -- to hack and cheat.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement