View Full Version : DirectX Matrix quiestion...

07-03-2005, 04:38 PM
I have a function

SetMatrix(Position, Rotation, Scale : TD3DVector): TD3DMatrix;

but how can i get back from TD3DMatrix to Position, Scale and Rotation?

ps. I need this cause Newton Game Dynamics messes up my matrix :P...

07-03-2005, 10:44 PM
The position, or translation in 3D terminology, is the last row of the matrix.

The rotation and scale are a bit more difficult because they get combined in the matrix, so extracting them can be tough. I'll see what I can find.

08-03-2005, 11:27 AM
About Rotations and Translations
-> Extracting rotation angles and translations from an arbitrary transformation matrix (http://lhcb-vd.web.cern.ch/lhcb-vd/beamtest/Alignment/AlignmentMath.htm)

08-03-2005, 02:46 PM

it explains a lot :) ... im gonna try to make a code out of it :)