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.

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)

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

Quaternion(Double, Double, Double, Double)

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)

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