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
Methods
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
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
4.3.0
.