Quaternion Constructors

Definition

Initializes a new instance of the Quaternion structure.

Overloads

Quaternion(Vector3D, Double)

Initializes a new instance of the Quaternion structure.

Quaternion(Double, Double, Double, Double)

Initializes a new instance of the Quaternion structure.

Quaternion(Vector3D, Double)

Initializes a new instance of the Quaternion structure.

C#
public Quaternion(System.Windows.Media.Media3D.Vector3D axisOfRotation, double angleInDegrees);

Parameters

axisOfRotation
Vector3D

Vector3D that represents the axis of rotation.

angleInDegrees
Double

Angle to rotate around the specified axis, in degrees.

Remarks

The W property of the quaternion is computed automatically.

Applies to

.NET Framework 4.8.1 agus leaganacha eile
Táirge Leaganacha
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

Quaternion(Double, Double, Double, Double)

Initializes a new instance of the Quaternion structure.

C#
public Quaternion(double x, double y, double z, double w);

Parameters

x
Double

Value of the new Quaternion's X coordinate.

y
Double

Value of the new Quaternion's Y coordinate.

z
Double

Value of the new Quaternion's Z coordinate.

w
Double

Value of the new Quaternion's W coordinate.

Remarks

For the axis (x, y, z) and angle of rotation theta, the w value for the quaternion is:

w = cos(theta/2)

Note that if you use the Vector3D constructor, the fourth parameter is the angle, in degrees, and the w calculation is performed for you.

Applies to

.NET Framework 4.8.1 agus leaganacha eile
Táirge Leaganacha
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10