Transform2D
ReferencesRepresents a transformation matrix for two-dimensional shader coordinate transformations.
Properties
Methods
Apply
#Transform a coordinate pair.
Chain
#Chain a set of transformations.
Parameters:
| transforms (params Transform2D[]) | Consecutive transformations. |
Returns: Combined transform.
Change
#Create a change-basis transformation centered on the world origin.
Parameters:
| xAxis ((double x, double y)) | X axis vector. |
| yAxis ((double x, double y)) | Y axis vector. |
Returns: Change of basis transformation.
CrossProd
#Compute the cross product of two vectors.
CrossSign
#Compute the sign of the cross product of two vectors.
Scale
#Create a uniform scaling transform.
Parameters:
| factor (double) | Scaling factor. |
Returns: Transformation.
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Transform2D | * | Transform2D | Transform2D | Multiply two matrices. |
| - | Transform2D | Transform2D | Create the inverse of a transform. | |