rhodonite
    Preparing search index...

    Class LogQuaternion_<T>Internal

    Generic base class for logarithms of quaternions.

    A log quaternion provides a more compact representation for quaternion interpolation and mathematical operations. It stores only the x, y, z components, as the w component is implicitly 1.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Internal typed array storage for logarithmic quaternion components (Float32Array or Float64Array)

    • get className(): string

      Gets the class name identifier.

      Returns string

      The string 'LogQuaternion'

    • get w(): number

      Gets the w component of the log quaternion. Always returns 1 for log quaternions.

      Returns number

      Always returns 1

    • get x(): number

      Gets the x component of the log quaternion.

      Returns number

      The x component value

    • get y(): number

      Gets the y component of the log quaternion.

      Returns number

      The y component value

    • get z(): number

      Gets the z component of the log quaternion.

      Returns number

      The z component value

    • Creates a log quaternion from individual x, y, z component values.

      Parameters

      • x: number

        The x component

      • y: number

        The y component

      • z: number

        The z component

      • type: FloatTypedArrayConstructor

        The typed array constructor to use

      Returns ILogQuaternion

      A new log quaternion

    • Creates a log quaternion from an array by copying the first 3 values.

      Parameters

      • array: number[]

        Array of numbers (only first 3 elements are used)

      • type: FloatTypedArrayConstructor

        The typed array constructor to use

      Returns ILogQuaternion

      A new log quaternion

    • Converts a regular quaternion to its logarithmic form.

      Uses the formula log(q) = (θ / sin(θ)) * (x, y, z) where θ = acos(w). When θ is 0 (identity rotation) the result is a zero log quaternion. When θ is close to π the logarithm is not representable and a zero log quaternion is returned instead of Infinity/NaN.

      Parameters

      Returns ILogQuaternion

      A new log quaternion representing the logarithm of the input quaternion