Interface TransformInterface

Transform coordinates and quaternions from one coordinate reference system into another one

interface TransformInterface {
    source: ReferenceSystemInterface;
    target: ReferenceSystemInterface;
    getInverse(): TransformInterface;
    transform(vector): Vector2;
    transform(vector): Vector3;
    transformQuaternion(quaternion, location?): Quaternion;
}

Properties

Source coordinate reference system

Target coordinate reference system

Methods

  • Compute and return the inverse transform, i.e., the one that transforms from the target to the source reference system.

    Returns TransformInterface

    Inverse transform

  • Transform a two-dimensional vector from the source to the target reference system.

    This method operates in-place, i.e., the vector is modified.

    Parameters

    • vector: Vector2

      Vector to transform

    Returns Vector2

    Transformed vector (same object as the argument)

  • Transform a three-dimensional vector from the source to the target reference system.

    This method operates in-place, i.e., the vector is modified.

    Parameters

    • vector: Vector3

      Vector to transform

    Returns Vector3

    Transformed vector (same object as the argument)

  • Transform a quaternion from the source to the target reference system.

    Parameters

    • quaternion: Quaternion

      Quaternion to transform

    • Optional location: Vector2 | Vector3

    Returns Quaternion

    Transformed quaternion (same object as the argument)

Generated using TypeDoc