Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AffineTransform

AffineTransform class represent an affine transform matrix. It's composed basically by translation, rotation, scale transformations.

Hierarchy

  • AffineTransform

Index

Constructors

constructor

  • newAffineTransform(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): AffineTransform
  • en

    constructor an AffineTransform object.

    zh

    构造二维放射变换矩阵。

    Parameters

    • Default value a: number = 1

      a

    • Default value b: number = 0

      b

    • Default value c: number = 0

      c

    • Default value d: number = 1

      d

    • Default value tx: number = 0

      tx

    • Default value ty: number = 0

      ty

    Returns AffineTransform

Properties

a

a: number

b

b: number

c

c: number

d

d: number

tx

tx: number

ty

ty: number

Methods

Static clone

Static concat

Static fromMat4

Static identity

Static invert

Static transformObb

  • Apply the AffineTransform on a rect, and turns to an Oriented Bounding Box. This function does not allocate any memory, you should create the output vectors by yourself and manage their memory.

    Parameters

    • out_bl: Vec2

      Output vector for storing the bottom left corner coordinates of the Obb object

    • out_tl: Vec2

      Output vector for storing the top left corner coordinates of the Obb object

    • out_tr: Vec2

      Output vector for storing the top right corner coordinates of the Obb object

    • out_br: Vec2

      Output vector for storing the bottom right corner coordinates of the Obb object

    • rect: Rect

      The rect object to apply transform.

    • anAffineTransform: AffineTransform

      transform matrix.

    Returns void

Static transformRect

Static transformSize

Static transformVec2

Generated using TypeDoc