【问题标题】:Rotate Point3D around Unit Vector围绕单位向量旋转 Point3D
【发布时间】:2015-06-11 23:05:02
【问题描述】:

如上图

我想围绕单位向量RotationAxis(图像中的红色向量及其中心)旋转点P1

在我的程序 (WPF) 中,我有一个四元数和一个 3DPoint。

如何旋转点P1

我尝试了矩阵旋转,但它什么也没旋转。

Matrix3D matrix = Matrix3D.Identity;
matrix.Rotate(RotationAxis); //RotationAxis is Quaternion
matrix.Transform(point3D); // point3D is Point3D that i want to rotate around RotationAxis

【问题讨论】:

  • 你看过QuaternionRotation3D吗?
  • 我看过了。我现在试试。 @泽维尔
  • 解决了!问题是我在调用矩阵变换后没有保存 point3D !无论如何,感谢您的评论,我会仔细研究它,以便将来有用,请参阅编辑! @泽维尔

标签: c# wpf rotation quaternions


【解决方案1】:

问题是我没有保存矩阵变换的结果

point3D = matrix.Transform(point3D); // now point3D rotates as it should be

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-14
    • 1970-01-01
    • 2021-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-11
    • 1970-01-01
    相关资源
    最近更新 更多