Using HelixToolkit in my code i have a rotation matrix (3x3) like :
UX VX WX
UY VY WY
UZ VZ WZ
And i want to rotate a GeometryModel3D. I found the RotateTransform3D and i need a Vector3D with an angle :
// Create and apply a transformation that rotates the object.
RotateTransform3D myRotateTransform3D = new RotateTransform3D();
AxisAngleRotation3D myAxisAngleRotation3d = new AxisAngleRotation3D();
**myAxisAngleRotation3d.Axis = new Vector3D(0, 3, 0);
myAxisAngleRotation3d.Angle = 40;**
myRotateTransform3D.Rotation = myAxisAngleRotation3d;
// Add the rotation transform to a Transform3DGroup
Transform3DGroup myTransform3DGroup = new Transform3DGroup();
myTransform3DGroup.Children.Add(myRotateTransform3D);
//ajoute the transformation to the model
model3D.Transform = myTransform3DGroup;
How can i calculate the vector and the angle from my rotation matrix ?