RSX Code Reference
    Preparing search index...

    Class Transform

    The Transform contains information about 3D object's position, rotation and scale. The class follows the 'copy-on-write' pattern, which means that every operation returns a copy of the transform with updated values. It also implies that the values of the transform cannot be directly modified.

    The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.

    Index
    _position: Vector3
    _rotation: Quaternion
    _scale: Vector3
    _skew: Vector3
    identity: Immutable<Transform>
    • get backward(): Vector3

      Determines the negative Z (backward) axis of the object.

      Returns Vector3

    • get down(): Vector3

      Gets the negative Y (down) axis of the object.

      Returns Vector3

    • get forward(): Vector3

      Determines the positive Z (forward) axis of the object.

      Returns Vector3

    • get inverseMatrix(): Matrix4

      Builds the inverse transform matrix.

      Returns Matrix4

    • get isUsingSkew(): boolean

      Returns true if the transform has a non-zero skew.

      Returns boolean

    • get left(): Vector3

      Gets the positive X (left) axis of the object.

      Returns Vector3

    • get matrix(): Matrix4

      Builds the transform matrix from current translation, rotation and scale properties.

      Returns Matrix4

    • get right(): Vector3

      Gets the negative X (right) axis of the object.

      Returns Vector3

    • get skew(): Vector3

      Skew factors in QDU convention: XY, XZ, YZ (vecU from QDUDecomposition). kZero means no skew.

      Returns Vector3

    • set skew(value: Immutable<Vector3>): void

      Parameters

      Returns void

    • get up(): Vector3

      Gets the positive Y (up) axis of the object.

      Returns Vector3

    • Clones this instance and returns a new Transform with identical values.

      Returns Transform

    • Orients the object so it is looking at the provided location (world space) while using the Y axis as the up axis.

      Parameters

      Returns Transform

    • Makes the current transform relative to the provided transform and returns the result. In other words, converts from a world coordinate system to one local to the provided transform.

      Parameters

      • parent: Immutable<Transform>

        Transform relative to which to make the current transform local.

      Returns Transform

    • Makes the current transform absolute. In other words, converts from a local coordinate system relative to the provided transform, to a world coordinate system.

      Parameters

      • parent: Immutable<Transform>

        Transform relative to which to make the current transform in world space.

      Returns Transform

    • Makes the current transform relative to the provided transform and returns the result. In other words, converts from a world coordinate system to one local to the provided transform.

      Parameters

      • parent: Immutable<Transform>

        Transform relative to which to make the current transform local.

      Returns Transform

    • Makes the current transform absolute and returns the result. In other words, converts from a local coordinate system relative to the provided transform, to a world coordinate system.

      Parameters

      • parent: Immutable<Transform>

        Transform relative to which to make the current transform in world space.

      Returns Transform

    • Converts the provided world position to a space relative to the provided parent, and sets it as the current transform's position.

      Parameters

      Returns void

    • Converts the provided world rotation to a space relative to the provided parent, and sets it as the current transform's rotation.

      Parameters

      Returns void

    • Returns a string representation of an object.

      Returns string