围绕单位向量旋转 Point3D

Rotate Point3D around Unit Vector

如上图

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

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

如何旋转点 P1?

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

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

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

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