I have a look at the XMMatrixInverse but don't understand how it works ?
He use a determinant , who know what it is ? And who can tell how to use it to compute inverse matrix?
I have a look at the XMMatrixInverse but don't understand how it works ?
He use a determinant , who know what it is ? And who can tell how to use it to compute inverse matrix?
Hi,
Take a look here for the maths of how to invert a matrix.
However, i wouldn't really dig deep into the XMMatrix* functions. They should be considered blackboxed, and they also can and do use intrinsics, which means MMX etc instructions to speed them up. This means you won't see actual floating point maths operations if you dig deep enough, just a bunch of inline assembler.
Also XMMatrixInverse etc work very well and are scalable, don't consider rewriting them unless you have a really good reason!
Hope this helps! :)
Games/Projects Currently In Development:
Discord RPG Bot | D++ - The Lightweight C++ Discord API Library | TriviaBot Discord Trivia Bot
He use a determinant , who know what it is ?
And who can tell how to use it to compute inverse matrix?
For advanced users: There are other ways in which the determinant is connected to the inverse. One I learned about recently is that the gradient of the determinant (as a function of n^2 variables) is the transpose of the inverse times the determinant squared, or something like that. It turns you can use that fact together with automatic differentiation to compute the inverse in a really whacky way.
If you transpose rotation matrix you get inverse rotation matrix. Ofc it cannot contain translation / scaling / etc.
For advanced users: There are other ways in which the determinant is connected to the inverse. One I learned about recently is that the gradient of the determinant (as a function of n^2 variables) is the transpose of the inverse times the determinant squared, or something like that. It turns you can use that fact together with automatic differentiation to compute the inverse in a really whacky way.If you transpose rotation matrix you get inverse rotation matrix. Ofc it cannot contain translation / scaling / etc.
Rather, the transpose of a matrix is equal to the inverse only if the matrix is orthogonal.