How to retrieve the 3D rotation angle on each axis?

I have a Model3DGroup which is rotated around any of the x, y, z axis using an AxisAngleRotation3D applied on the Transform property of the object.

The problem is that I am not in control of the various rotations applied on the mesh. I need to display the angle of the mesh on each of the x, y, z axis at each render loop.

How can I do that? I tried retrieving the AxisAngleRotation3D object on the object, but it only gives me the rotation that was last applied. Which is not correct.

If for example there was an applied rotation of Axis: Vector3D(1, 1, 0) Angle: 45

The actual rotation around Z axis would not be 0. How can I get the actual angle on each axis?

Answers


 double rotationX = Vector3D.AngleBetween(new Vector3D(1, 0, 0), yourMatrix3D.Transform(new Vector3D(1, 0, 0)));
 double rotationY = Vector3D.AngleBetween(new Vector3D(0, 1, 0), yourMatrix3D.Transform(new Vector3D(0, 1, 0)));
 double rotationZ = Vector3D.AngleBetween(new Vector3D(0, 0, 1), yourMatrix3D.Transform(new Vector3D(0, 0, 1)));

Need Your Help

Understanding Python Pickle Insecurity

python security namespaces pickle

It states in the Python documentation that pickle is not secure and shouldn't parse untrusted user input. If you research this; almost all examples demonstrate this with a system() call via os.sys...

How to serialize an IList<T>?

c# .net web-services .net-3.5 ibatis.net

I've got an OR mapper (iBatis.Net) that returns an IList.