Interface QuatArg
- All Known Implementing Classes:
Quat
public interface QuatArg
Read-only access to a
Quat. (native type: const Quat)-
Method Summary
Modifier and TypeMethodDescriptionReturn the conjugate.floatgetW()Return the real (W) component in single precision.floatgetX()Return the first imaginary (X) component in single precision.floatgetY()Return the 2nd imaginary (Y) component in single precision.floatgetZ()Return the 3rd imaginary (Z) component in single precision.booleanTest whether the quaternion is normalized to within a tolerance of 10^-5.booleanisNormalized(float tolerance) Test whether the quaternion is normalized to within the specified tolerance.floatlength()Return the length.floatlengthSq()Return the squared length.Generate a normalized quaternion that represents the same rotation.
-
Method Details
-
conjugated
Quat conjugated()Return the conjugate. The current object is unaffected.- Returns:
- a new object
-
getW
float getW()Return the real (W) component in single precision. The quaternion is unaffected.- Returns:
- the component value
-
getX
float getX()Return the first imaginary (X) component in single precision. The quaternion is unaffected.- Returns:
- the component value
-
getY
float getY()Return the 2nd imaginary (Y) component in single precision. The quaternion is unaffected.- Returns:
- the component value
-
getZ
float getZ()Return the 3rd imaginary (Z) component in single precision. The quaternion is unaffected.- Returns:
- the component value
-
isNormalized
boolean isNormalized()Test whether the quaternion is normalized to within a tolerance of 10^-5. The quaternion is unaffected.- Returns:
- true if normalized, otherwise false
-
isNormalized
boolean isNormalized(float tolerance) Test whether the quaternion is normalized to within the specified tolerance. The quaternion is unaffected.- Parameters:
tolerance- the desired tolerance (default=1e-5)- Returns:
- true if normalized, otherwise false
-
length
float length()Return the length. The quaternion is unaffected.- Returns:
- the length
-
lengthSq
float lengthSq()Return the squared length. The quaternion is unaffected.- Returns:
- the squared length
-
normalized
Quat normalized()Generate a normalized quaternion that represents the same rotation. The current object is unaffected.- Returns:
- a new quaternion
-