Quaternion 构造函数

定义

初始化 Quaternion 结构的新实例。Initializes a new instance of the Quaternion structure.

重载

Quaternion(Vector3D, Double)

初始化 Quaternion 结构的新实例。Initializes a new instance of the Quaternion structure.

Quaternion(Double, Double, Double, Double)

初始化 Quaternion 结构的新实例。Initializes a new instance of the Quaternion structure.

Quaternion(Vector3D, Double)

初始化 Quaternion 结构的新实例。Initializes a new instance of the Quaternion structure.

public:
 Quaternion(System::Windows::Media::Media3D::Vector3D axisOfRotation, double angleInDegrees);
public Quaternion (System.Windows.Media.Media3D.Vector3D axisOfRotation, double angleInDegrees);
new System.Windows.Media.Media3D.Quaternion : System.Windows.Media.Media3D.Vector3D * double -> System.Windows.Media.Media3D.Quaternion
Public Sub New (axisOfRotation As Vector3D, angleInDegrees As Double)

参数

axisOfRotation
Vector3D

表示旋转轴的 Vector3DVector3D that represents the axis of rotation.

angleInDegrees
Double

绕指定轴旋转的角度(以度为单位)。Angle to rotate around the specified axis, in degrees.

注解

W四元数的属性将自动计算。The W property of the quaternion is computed automatically.

适用于

Quaternion(Double, Double, Double, Double)

初始化 Quaternion 结构的新实例。Initializes a new instance of the Quaternion structure.

public:
 Quaternion(double x, double y, double z, double w);
public Quaternion (double x, double y, double z, double w);
new System.Windows.Media.Media3D.Quaternion : double * double * double * double -> System.Windows.Media.Media3D.Quaternion
Public Sub New (x As Double, y As Double, z As Double, w As Double)

参数

x
Double

Quaternion 的 X 坐标值。Value of the new Quaternion's X coordinate.

y
Double

Quaternion 的 Y 坐标值。Value of the new Quaternion's Y coordinate.

z
Double

Quaternion 的 Z 坐标值。Value of the new Quaternion's Z coordinate.

w
Double

Quaternion 的 W 坐标值。Value of the new Quaternion's W coordinate.

注解

对于轴 (x、y、z) 和旋转 theta 的角度, w 四元数的值为:For the axis (x, y, z) and angle of rotation theta, the w value for the quaternion is:

w = cos (theta/2) w = cos(theta/2)

请注意,如果使用 Vector3D 构造函数,则第四个参数是角度(以度为单位),w 计算为您执行。Note that if you use the Vector3D constructor, the fourth parameter is the angle, in degrees, and the w calculation is performed for you.

适用于