Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AffineTransform

二维仿射变换矩阵,描述了平移、缩放和缩放。

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

  • 应用二维仿射变换矩阵到矩形上, 并转换为有向包围盒。 这个函数不创建任何内存,你需要先创建包围盒的四个 Vector 对象用来存储结果,并作为前四个参数传入函数。

    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