Jump to content
  • Advertisement
Sign in to follow this  
LostSource

Matrix Inverse

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

Ello All, I was curious if the D3DXMatrixInverse function takes the inverse of the 3x3 portion (not including the translation part of the matrix) of the matrix, or does it take the inverse the full 4x4 matrix (including the translation part)? It was seem that it would only need to take the 3x3 portion because the _14, _24, _34, _44 ij positions would stay 0 and 1. --------------- In addition: If the 4x4 Matrix is viewed in portions
 R | 0
---|---
 T | 1
R = 3x3 linear transformations (rotation, scale, shear, ...) T = translation (x, y, z) Then when D3DXMatrixInverse takes the inverse of the matrix, does it need to take the inverse T portion? If it does why? [Edited by - LostSource on March 2, 2007 1:15:45 AM]

Share this post


Link to post
Share on other sites
Advertisement
I sure hope it takes the inverse of the whole matrix, otherwise I have a whole lot of potentially bugged up code. I'm pretty sure it does though.

A 4x4 matrix isn't guaranteed to be a rotation and translation. It could be anything, perhaps a projection matrix or just a general linear system.

If you only inverted the rotational part (assuming no scaling is going on), then you'd rotate in the opposite angle about the same axis, and you'd still be translated into the same position. If you invert the whole thing, you will also translate yourself in the opposite direction. I think...

I hate math.

Share this post


Link to post
Share on other sites
I believe stanlo is right. The function is supposed to return
Quote:

Return Values
Pointer to a D3DXMATRIX structure that is the inverse of the matrix


It's usage is not restricted to a specific type of matrices. So it should take the inverse of the entire matrix.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!