Package: pumpkin.geom

Matrix


Description

A 2x2 transformation matrix.



Constructors

Matrix

Create new Matrix.

Matrix

Create new Matrix with rotation,scale and translation components.


Functions

clone

Clone the current matrix.

setRotation

Set the rotation in radians.

setRotation

Set the rotation and scale.

invert

Invert the matrix.

transformPoint

Apply geometric transform to a point.

transformVector3

Apply geometric transform to a Vector3.

transformVector3

Apply geometric transform to a Vector3.

translate

Translate the matrix x & y position by setting the tx & ty.

rotate

Rotate the matrix.

scale

Scale the matrix.

scale2

concat

Concatenates or combine the Matrix.

mult

Multiply or combine the Matrix ( same as concat ).

multNoCopy

identity

Set the Matrix to the default non-transformed state.

getScaleX

Get the scale X from the Matrix.

getScaleY

Get the scale Y from the Matrix.

getScaleXNoNeg

Get the scale X from the Matrix.

getScaleYNoNeg

Get the scale Y from the Matrix.

getRotation

transformRect

Apply geometric transform to a Rect.

transformRect

Apply geometric transform to a Rectangle.

copyTo

Copy this matrix to another.

copyToStruct

Copy this matrix to another.

getRotationProjected

[internal] Get the rotation from the Matrix.

getSkewX

getSkewY

hasSkew

hasSkewX

hasSkewY


Variables

a

b

c

d

tx

ty

SKEW_TOLERANCE