Back to class index
Quat[Class Summary]
x
y
z
w
identity[static][const]
nan[static][const]
ctor (+7 overloads)
WorldX()[const]
WorldY()[const]
WorldZ()[const]
Axis()[const]
Angle()[const]
Dot(rhs)[const]
LengthSq()[const]
Length()[const]
Normalize()
Normalized()[const]
IsNormalized(epsilon)[const]
IsInvertible(epsilon)[const]
IsFinite()[const]
Equals(rhs,epsilon)[const]
BitEquals(other)[const]
ptr() (+1 overload)
Inverse()
Inverted()[const]
InverseAndNormalize()
Conjugate()
Conjugated()[const]
Transform(x,y,z)[const] (+2 overloads)
Lerp(target,t)[const]
Slerp(target,t)[const]
AngleBetween(target)[const]
AxisFromTo(target)[const]
ToAxisAngle(...)[const] (+1 overload)
SetFromAxisAngle(...) (+1 overload)
Set(matrix) (+3 overloads)
ToEulerXYX()[const]
ToFloat3x3()[const]
ToFloat3x4()[const]
ToFloat4x4()[const] (+2 overloads)
ToString()[const]
ToString2()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
operator*(rhs)[const] (+2 overloads)
operator/(rhs)[const]
operator+()[const]
Mul(rhs)[const] (+3 overloads)
Neg()[const]
Lerp(source,target,t)[static]
Slerp(source,target,t)[static]
SlerpVector(from,to,t)[static]
SlerpVectorAbs(...)[static]
LookAt(...)[static]
RotateX(angleRadians)[static]
RotateY(angleRadians)[static]
RotateZ(angleRadians)[static]
RotateAxisAngle(...)[static]
RotateFromTo(...)[static] (+2 overloads)
FromEuler***(x2,y,x)[static]
RandomRotation(lcg)[static]
FromString(str,outEndStr)[static] (+1 overload)

Quat::Quat

Syntax

Quat::Quat(); [1 line of code]

Syntax

Quat::Quat(const float *data); [16 lines of code]
Quat::Quat(const float3x3 &rotationMatrix); [1 lines of code]
Quat::Quat(const float3x4 &rotationMatrix); [1 lines of code]
Quat::Quat(const float4x4 &rotationMatrix); [1 lines of code]
Quat::Quat(float x, float y, float z, float w); [9 lines of code]

Constructs a quaternion from the given data buffer.

Note
The input data is not normalized after construction, this has to be done manually.

Note
The input data is not normalized after construction, this has to be done manually.

Parameters

const float *dataAn array of four floats to use for the quaternion, in the order 'x, y, z, w'. (== 'i, j, k, r') floatxThe factor of i. floatyThe factor of j. floatzThe factor of k. floatwThe scalar factor (or 'w').

Syntax

Quat::Quat(const float3 &rotationAxis, float rotationAngleRadians); [1 line of code]
Quat::Quat(const float4 &rotationAxis, float rotationAngleRadians); [1 lines of code]

Constructs this quaternion by specifying a rotation axis and the amount of rotation to be performed about that axis.

Parameters

const float3 &rotationAxisThe normalized rotation axis to rotate about. If using the float4 version of the constructor, the w component of this vector must be 0. floatrotationAngleRadiansThe angle to rotate by, in radians. For example, Pi/4.f equals to 45 degrees, Pi/2.f is 90 degrees, and Pi is 180 degrees.

See Also

DegToRad().