Sign in to follow this  
unreason

Manual matrix manipulation

Recommended Posts

unreason    139
I'd like to use the DirectX matrix functions on some variables I have. Basically, I have some X-Y coordinates, and I want to do transforms on them independent of the actual rendering and world matrices. Is there any way I can do this?

Share this post


Link to post
Share on other sites
Stevieboy    238
It should work, but you still have to understand what you are doing with them and what the function you are using does.
When you use a function it still returns or changes the matrices you use with it. They are used on the 3d pipeline when you call SetMatrix(), but before that the results are still in whatever returned matrix you are using.
The only other problem is how to access the results, to do that you may need to access the matrix elements directly, i.e. MyX = MyMat._11 etc.
Why do you need to do this anyway, I tried it myself (thats how I know), but I think I didn't understand the matrices properly and what result was where (in the matrix). I was trying to rotate 2d quads but I ended up more or less just using sin & cos on the vertices instead.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this