Class Orientation

Orientation quaternion with accuracy

Hierarchy-Diagram

UML class diagram of Orientation
Legend
icon for a class in the UML class diagram class

Hierarchy

Constructors

Properties

_onChangeCallback: (() => void)

Type declaration

    • (): void
    • Returns void

accuracy: Accuracy<AngleUnit, number>
isQuaternion: true
timestamp: number
w: number
x: number
y: number
z: number

Methods

  • Returns Generator<number, void, unknown>

  • Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns Quaternion

  • Parameters

    • q: Quaternion

    Returns number

  • Returns Quaternion

  • Copies values of q to this quaternion.

    Parameters

    • q: Quaternion

    Returns Orientation

  • Parameters

    • v: Quaternion

    Returns number

  • Parameters

    • v: Quaternion

    Returns boolean

  • Sets this quaternion's x, y, z and w value from the provided array or array-like.

    Parameters

    • array: number[] | ArrayLike<number>

      the source array or array-like.

    • Optional offset: number

      (optional) offset into the array. Default is 0.

    Returns Orientation

  • Returns Quaternion

  • Deprecated

    Use .invert() instead.

    Returns Quaternion

  • Inverts this quaternion.

    Returns Quaternion

  • Computes length of this quaternion.

    Returns number

  • Returns number

  • Multiplies this quaternion by b.

    Parameters

    • q: Quaternion

    Returns Quaternion

  • Deprecated

    Use Vector#applyQuaternion vector.applyQuaternion( quaternion ) instead.

    Parameters

    • v: any

    Returns any

  • Normalizes this quaternion.

    Returns Quaternion

  • Parameters

    • q: Quaternion

    Returns Quaternion

  • Returns Quaternion

  • Parameters

    • q: Quaternion
    • step: number

    Returns Quaternion

  • Sets values of this quaternion.

    Parameters

    • x: number
    • y: number
    • z: number
    • w: number

    Returns Quaternion

  • Sets this quaternion from rotation specified by Euler angles.

    Parameters

    • euler: Euler
    • Optional update: boolean

    Returns Quaternion

  • Parameters

    • vFrom: Vector3
    • vTo: Vector3

    Returns Quaternion

  • Parameters

    • qb: Quaternion
    • t: number

    Returns Quaternion

  • Parameters

    • qa: Quaternion
    • qb: Quaternion
    • t: number

    Returns Quaternion

  • Returns an array [x, y, z, w], or copies x, y, z and w into the provided array.

    Returns

    The created or provided array.

    Parameters

    • Optional array: number[]

      (optional) array to store the quaternion to. If this is not provided, a new array will be created.

    • Optional offset: number

      (optional) optional offset into the array.

    Returns number[]

  • Copies x, y, z and w into the provided array-like.

    Returns

    The provided array-like.

    Parameters

    • array: ArrayLike<number>

      array-like to store the quaternion to.

    • Optional offset: number

      (optional) optional offset into the array.

    Returns ArrayLike<number>

  • Convert a threejs quaternion to serializable quaternion

    Returns

    Serializable quaternion

    Type Parameters

    Parameters

    • threeQuaternion: Quaternion

      ThreeJS created quaternion

    Returns InstanceType<T>

  • Parameters

    • dst: number[]
    • dstOffset: number
    • src0: number[]
    • srcOffset: number
    • src1: number[]
    • stcOffset1: number

    Returns number[]

  • Deprecated

    Use qm.slerpQuaternions( qa, qb, t ) instead..

    Parameters

    • qa: Quaternion
    • qb: Quaternion
    • qm: Quaternion
    • t: number

    Returns number

  • Parameters

    • dst: number[]
    • dstOffset: number
    • src0: number[]
    • srcOffset: number
    • src1: number[]
    • stcOffset1: number
    • t: number

    Returns Quaternion