Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Getting a matrix basis with DirectXMath


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 mrheisenberg   Members   -  Reputation: 332

Like
0Likes
Like

Posted 25 December 2012 - 04:40 PM

Not exactly sure if this is for Math&Physics or DirectX...
Is there any way to get the X Y and Z basis from a XMMATRIX with DirectXMath/XNAMath ( http://asawicki.info/Download/Misc/XNA_Math_Cheatsheet/XNA_Math_Cheatsheet_1-1.pdf ) or must it be done by hand from a XMFLOAT4X4?None of these functions seems to do that.


Edited by mrheisenberg, 25 December 2012 - 04:40 PM.


Sponsor:

#2 MJP   Moderators   -  Reputation: 5463

Like
0Likes
Like

Posted 25 December 2012 - 09:44 PM

The X, Y, and Z basis vectors for a row-major matrix are just the first, second, and third rows of the matrix respectively. XMMATRIX is defined as an array of 4 XMVECTOR's, so you can just index into that array to get a row as an XMVECTOR.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS