View Full Version : DirectX Matrix quiestion...

07-03-2005, 03: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, 09: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, 10: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, 01:46 PM

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