# Quaternion 构造函数

## 重载

 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)

``````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

angleInDegrees
Double

### 注解

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

## Quaternion(Double, Double, Double, Double)

``````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.

### 注解

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