Class Transform

Constructors

Properties

isAffine: boolean

Tests for an affine transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. An affine transformation can be broken into a linear transformation and a translation.

isIdentity: boolean

Return true if this Transform is the identity transform

isLinear: boolean

Tests for a linear transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. If in addition its last column is ( 0, 0, 0, 1)^T then it is linear. An affine transformation can be broken into a linear transformation and a translation.

isRotation: boolean

Returns true if this is a proper rotation.

isValid: boolean

Gets a value indicating whether or not this Transform is a valid matrix. A valid transform matrix is not allowed to have any invalid numbers.

isZero: boolean

True if matrix is Zero4x4, ZeroTransformation, or some other type of zero. The value xform[3][3] can be anything.

isZero4x4: boolean

True if all values are 0

isZeroTransformation: boolean

True if all values are 0, except for M33 which is 1.

m00: number

Gets or sets this[0,0].

m01: number

Gets or sets this[0,1].

m02: number

Gets or sets this[0,2].

m03: number

Gets or sets this[0,3].

m10: number

Gets or sets this[1,0].

m11: number

Gets or sets this[1,1].

m12: number

Gets or sets this[1,2].

m13: number

Gets or sets this[1,3].

m20: number

Gets or sets this[2,0].

m21: number

Gets or sets this[2,1].

m22: number

Gets or sets this[2,2].

m23: number

Gets or sets this[2,3].

m30: number

Gets or sets this[3,0].

m31: number

Gets or sets this[3,1].

m32: number

Gets or sets this[3,2].

m33: number

Gets or sets this[3,3].

Gets a value indicating whether or not the Transform is rigid. A rigid transformation can be broken into a proper rotation and a translation, while an isometry transformation could also include a reflection.

similarityType: TransformSimilarityType

Gets a value indicating whether or not the Transform maintains similarity. The easiest way to think of Similarity is that any circle, when transformed, remains a circle. Whereas a non-similarity Transform deforms circles into ellipses.

Methods

  • Parameters

    • rowDominant: boolean

      If true, returns { M00, M01, M02...}. If false, returns { M00, M10, M20...}.

    Returns number[]

    An array of 16 floats.

    Description

    Return the matrix as a linear array of 16 float values.

  • Returns BoundingBox

    A new bounding box.

    Description

    Computes a new bounding box that is the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.

  • Returns Transform

    [boolean, Transform] (boolean) true on success. If false is returned and this Transform is Invalid, inserveTransform will be set to this Transform. If false is returned and this Transform is Valid, inverseTransform will be set to a pseudo inverse. (Transform) The inverse transform. This out reference will be assigned during this call.

    Description

    Attempts to get the inverse transform of this transform.

  • Parameters

    • pointOnMirrorPlane: number[]

      Point on the mirror plane.

    • normalToMirrorPlane: number[]

      Normal vector to the mirror plane.

    Returns Transform

    A transformation matrix which mirrors geometry in a specified plane.

    Description

    Create mirror transformation matrix The mirror transform maps a point Q to Q - (2*(Q-P)oN)*N, where P = pointOnMirrorPlane and N = normalToMirrorPlane.

  • Parameters

    Returns Transform

    A transformation matrix that combines the effect of both input transformations. The resulting Transform gives the same result as though you'd first apply B then A.

    Description

    Multiplies (combines) two transformations. This is the same as the * operator between two transformations.

  • Parameters

    • plane0: Plane

      The plane to orient from.

    • plane1: Plane

      the plane to orient to.

    Returns Transform

    The translation transformation if successful, Transform.Unset on failure.

    Description

    Create a rotation transformation that orients plane0 to plane1. If you want to orient objects from one plane to another, use this form of transformation.

  • Parameters

    • sinAngle: number

      Sine of the rotation angle.

    • cosAngle: number

      Cosine of the rotation angle.

    • rotationAxis: number[]

      3D unit axis of rotation.

    • rotationCenter: number[]

      3D center of rotation.

    Returns Transform

    A rotation transformation matrix.

    Description

    Constructs a new rotation transformation with specified angle, rotation center and rotation axis.

  • ...

    Parameters

    • startDirection: number[]
    • endDirection: number[]
    • rotationCenter: number[]

    Returns Transform

  • Parameters

    • anchor: number[]

      Defines the anchor point of the scaling operation.

    • scaleFactor: number

      Scaling factor in all directions.

    Returns Transform

    A transform matrix which scales geometry uniformly around the anchor point.

    Description

    Constructs a new uniform scaling transformation with a specified scaling anchor point.

  • Parameters

    • plane: Plane

      Base plane for shear.

    • x: number[]

      Shearing vector along plane x-axis.

    • y: number[]

      Shearing vector along plane y-axis.

    • z: number[]

      Shearing vector along plane z-axis.

    Returns Transform

    A transformation matrix which shear geometry.

    Description

    Constructs a Shear transformation.

Generated using TypeDoc