我用这个 C# 代码设置了我的 RotateTransform3D:
rotation = new RotateTransform3D(
    new AxisAngleRotation3D(new Vector3D(0, 0, 1),
    Convert.ToDouble(5)),
    new Point3D(0, 0, 0)
);
我如何找回“5”?如果我做
MessageBox.Show(rotation.Rotation.toString())
它说System.Windows.Media.Media3D.AxisAngleRotation3D但是“.Rotation”应该产生一个Rotation3D对象,就像MSDN说的那样。
我怎样才能做到这一点?
编辑:其他信息
在我的代码中,我将其设置RotateTransform3D为 a 内的孩子Transform3DGroup:
myGroupArray[0].Children.Add(
    new RotateTransform3D(
        new AxisAngleRotation3D(new Vector3D(0, 0, 1),
        Convert.ToDouble(5)),
        new Point3D(0, 0, 0)
    )
);
在另一个函数中,我尝试用这个来恢复我的“5”:
RotateTransform3D rotation = new RotateTransform3D();
rotation = (RotateTransform3D)myGroupArray[0].Children[0];
现在,即使在做
MessageBox.Show(rotation.Rotation.Angle.ToString());
导致错误,因为Rotation3D不包含Angle属性