Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Getting a matrix basis with DirectXMath

4: Adsense

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   

360
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.


#2 MJP   Moderators   

19443
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.