Transform2D
ReferencesRepresents a transformation matrix for two-dimensional shader coordinate transformations.
Properties
Methods
Apply
#Transform a coordinate pair.
Change
#Create a change-basis transformation centered on the world origin.
Returns: Change of basis transformation.
CrossSign
#Compute the sign of the cross product of two vectors.
Returns: True if the cross product is positive.
Rotate
#Create a rotation matrix.
public static Transform2D Rotate()
angle,
Rotation angle.
anchorX,
Scaling centre point X coordinate.
anchorY
Scaling centre point Y coordinate.
Returns: Matrix.
Scale
#Create a uniform scaling transform.
public static Transform2D Scale()
factorX,
Scaling factor along X.
factorY,
Scaling factor along Y.
anchorX,
Scaling centre point X coordinate.
anchorY
Scaling centre point Y coordinate.
Returns: Transformation.
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Transform2D | * | Transform2D | Transform2D | Multiply two matrices. |
| - | Transform2D | Transform2D | Create the inverse of a transform. | |