Helper class for making fast matrix calculations for rendering. It mostly copies Matrix class, but with some additions for faster rotation by 90 degrees.

Constructor

new(?a:Float, ?b:Float, ?c:Float, ?d:Float, ?tx:Float, ?ty:Float)

Methods

inlinerotateBy180():FlxMatrix

Adds 180 degrees to rotation of this matrix

Returns:

rotated matrix

inlinerotateByNegative90():FlxMatrix

Subtract 90 degrees from rotation of this matrix

Returns:

rotated matrix

inlinerotateByPositive90():FlxMatrix

Adds 90 degrees to rotation of this matrix

Returns:

rotated matrix

inlinerotateWithTrig(cos:Float, sin:Float):FlxMatrix

Rotates this matrix, but takes the values of sine and cosine, so it might be useful when you rotate multiple matrices by the same angle

Parameters:

cos

The cosine value for rotation angle

sin

The sine value for rotation angle

Returns:

this transformed matrix

inlinetransformX(px:Float, py:Float):Float

Transforms x coordinate of the point. Took original code from openfl.geom.Matrix (which isn't available on flash target).

Parameters:

px

x coordinate of the point

py

y coordinate of the point

Returns:

transformed x coordinate of the point

Available since

4.3.0

.

inlinetransformY(px:Float, py:Float):Float

Transforms y coordinate of the point. Took original code from openfl.geom.Matrix (which isn't available on flash target).

Parameters:

px

x coordinate of the point

py

y coordinate of the point

Returns:

transformed y coordinate of the point

Available since

4.3.0

.

Inherited Variables

Inherited Methods

Defined by Matrix

@:require(flash11)copyColumnFrom(column:Int, vector3D:Vector3D):Void

@:require(flash11)copyColumnTo(column:Int, vector3D:Vector3D):Void

@:require(flash11)copyFrom(sourceMatrix:Matrix):Void

@:require(flash11)copyRowFrom(row:Int, vector3D:Vector3D):Void

@:require(flash11)copyRowTo(row:Int, vector3D:Vector3D):Void

@:value({ ty : 0, tx : 0, rotation : 0 })createBox(scaleX:Float, scaleY:Float, rotation:Float = 0, tx:Float = 0, ty:Float = 0):Void

@:value({ ty : 0, tx : 0, rotation : 0 })createGradientBox(width:Float, height:Float, rotation:Float = 0, tx:Float = 0, ty:Float = 0):Void

@:require(flash11)setTo(a:Float, b:Float, c:Float, d:Float, tx:Float, ty:Float):Void