我有一个 Model3DGroup,它使用应用于对象的 Transform 属性的 AxisAngleRotation3D 围绕任何 x、y、z 轴旋转。
问题是我无法控制网格上应用的各种旋转。
我需要在每个渲染循环的 x、y、z 轴上显示网格的角度。
我怎样才能做到这一点?我尝试检索对象上的 AxisAngleRotation3D 对象,但它只提供最后应用的旋转。这是不正确的。
例如,如果应用旋转
轴:Vector3D(1, 1, 0)
角度:45
实际绕Z轴的旋转不会为0。
如何获得每个轴上的实际角度?
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)));
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)