Converts a 3D matrix to a 2D matrix. Beware that this will work only for a 3D matrix describing a pure 2D transformation.
Converts a 2D matrix to a 3D matrix. If you pass an out
-matrix,
the result will be stored in this matrix instead of creating a new object.
Creates a orthographic projection matrix suitable for 2D rendering.
Creates a perspective projection matrix suitable for 2D and 3D rendering.
The first 4 parameters define which area of the stage you want to view (the camera will 'zoom' to exactly this region). The final 3 parameters determine the perspective in which you're looking at the stage.
The stage is always on the rectangle that is spawned up between x- and y-axis (with the given size). All objects that are exactly on that rectangle (z equals zero) will be rendered in their true size, without any distortion.
If you pass only the first 4 parameters, the camera will be set up above the center of the stage, with a field of view of 1.0 rad.
Determines if the matrix is an identity matrix.
Determines if the 3D matrix is an identity matrix.
Prepends a matrix to 'base' by multiplying it with another matrix.
Prepends an incremental rotation to a Matrix object (angle in radians).
Prepends an incremental scale change to a Matrix object.
Prepends a skew transformation to a Matrix object (angles in radians). The skew matrix has the following form:
| cos(skewY) -sin(skewX) 0 | | sin(skewY) cos(skewX) 0 | | 0 0 1 |
Prepends an incremental translation to a Matrix object.
Appends a skew transformation to a matrix (angles in radians). The skew matrix has the following form:
| cos(skewY) -sin(skewX) 0 | | sin(skewY) cos(skewX) 0 | | 0 0 1 |
Updates the given matrix so that it points exactly to pixel boundaries. This works only if the object is unscaled and rotated by a multiple of 90 degrees.
@param matrix The matrix to manipulate in place (normally the modelview matrix). @param pixelSize The size (in points) that represents one pixel in the back buffer.
Converts a Matrix instance to a String, which is useful when debugging.
Converts a Matrix3D instance to a String, which is useful when debugging. Per default, the raw data is displayed transposed, so that the columns are displayed vertically.
Uses a matrix to transform 2D coordinates into a different space. If you pass an
out
-point, the result will be stored in this point instead of creating a
new object.
Uses a matrix to transform 3D coordinates into a different space. If you pass a 'resultVector', the result will be stored in this vector3D instead of creating a new object.
Transform a point with the given matrix.
Transforms a 3D point with the given matrix.
Generated using TypeDoc
A utility class containing methods related to the Matrix class.