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]
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]
SetFromAxisAngle(...)
Set(matrix) (+3 overloads)
ToEulerXYX()[const]
ToFloat3x3()[const]
ToFloat3x4()[const]
ToFloat4x4()[const]
operator*(rhs)[const] (+1 overload)
operator/(rhs)[const]
Mul(rhs)[const] (+3 overloads)
Lerp(source,target,t)[static]
Slerp(source,target,t)[static]
LookAt(...)[static]
RotateX(angleRadians)[static]
RotateY(angleRadians)[static]
RotateZ(angleRadians)[static]
RotateAxisAngle(...)[static]
RotateFromTo(...)[static] (+1 overload)
FromEuler***(x2,y,x)[static]
RandomRotation(lcg)[static]
FromString(str)[static]

Quat::Mul

Syntax

Quat Quat::Mul(const Quat &rhs) const; [1 line of code]

Multiplies two quaternions in the order 'this * rhs'.

This corresponds to the concatenation of the two operations ('this * rhs * vector' applies the rotation 'rhs' first, followed by the rotation 'this'.

Performance

8.21nsecs/call ≈ 121.8M calls/second ≈ 2.03M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Syntax

Quat Quat::Mul(const float3x3 &rhs) const; [1 line of code]

Converts the given matrix to a quaternion and computes the concatenated transform 'this * rhs'.

Performance

0.074μsecs/call ≈ 13.53M calls/second ≈ 225.55k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Syntax

float3 Quat::Mul(const float3 &vector) const; [1 line of code]
float4 Quat::Mul(const float4 &vector) const; [1 lines of code]

Transforms the given vector by this Quaternion.

Note
Technically, this function does not perform a simple multiplication of 'q * v', but instead performs a conjugation operation 'q*v*q^-1'. This corresponds to transforming the given vector by this Quaternion.

Performance

float3 Quat::Mul(const float3 &vector) const

20.526nsecs/call ≈ 48.72M calls/second ≈ 811.97k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

float4 Quat::Mul(const float4 &vector) const

24.632nsecs/call ≈ 40.6M calls/second ≈ 676.64k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index