Constructor quaternion
quaternion(float, float, float, float)
Constructs a quaternion from four float values.
Declaration
public quaternion(float x, float y, float z, float w)
Parameters
Type | Name | Description |
---|---|---|
float | x | The quaternion x component. |
float | y | The quaternion y component. |
float | z | The quaternion z component. |
float | w | The quaternion w component. |
quaternion(float4)
Constructs a quaternion from float4 vector.
Declaration
public quaternion(float4 value)
Parameters
Type | Name | Description |
---|---|---|
float4 | value | The quaternion xyzw component values. |
quaternion(float3x3)
Constructs a unit quaternion from a float3x3 rotation matrix. The matrix must be orthonormal.
Declaration
public quaternion(float3x3 m)
Parameters
Type | Name | Description |
---|---|---|
float3x3 | m | The float3x3 orthonormal rotation matrix. |
quaternion(float4x4)
Constructs a unit quaternion from an orthonormal float4x4 matrix.
Declaration
public quaternion(float4x4 m)
Parameters
Type | Name | Description |
---|---|---|
float4x4 | m | The float4x4 orthonormal rotation matrix. |