Jump to content
  • Advertisement
Sign in to follow this  
k00k

Matrix.RotationAxis Question

This topic is 4498 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

Guys im currently writting a graphics engine wrapper for MDX. and I have implemented my own Matrix Struct as I have that fairly done I need some help with a few of the Methods inside the Matrix Functions in DirectX. First Does anyone have the (Math) behind Matrix.RotationAxis(vector, float)? I need to add that method to mu struct but im not sure of what it is doing .. does is just take the vector and add the angle to the vectors X,Y and Z positions? also im trying to override Vector3.TransformNormal as well. if anyone can help I would apreciate it thanks

Share this post


Link to post
Share on other sites
Advertisement
Ok so nobody know's whats going on behind the doors of D3DXMatrixRotationAxis's method? thats basically the only one I need I figured out the TransformNormal Method.

Share this post


Link to post
Share on other sites
Well the RotationAxis function builds a rotaion matrix that rotates an object an arbitrary amount an arbitrary axis :) now we got that out of the way... to the math!

Have you implemented Quaternions yet? Oh hell you can use DX's quats, just do like so:

Quaternion rotation = Quaternion.RotationAxis(<your axis here>, <your angle here>);
return Matrix.FromQuaternion(rotation);


In case you haven't implemented Quaternions yet, you might wanna look here. It's bad graphics but it's a good resource.

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!