public class MatrixHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
concatenate(float[] matrix,
float[] other)
Preconcats the matrix with the specified matrix.
|
static void |
copy(float[] dest,
float[] src)
Deep copies the given matrix into destination.
|
static float[] |
create()
Creates a matrix.
|
static float[] |
create(float x,
float y)
Creates an identity matrix translated to (x,y) .
|
static float[] |
createIdentity()
Creates an identity matrix.
|
static void |
identity(float[] matrix)
Updates the matrix as identity matrix.
|
static void |
reset(float[] matrix,
float x,
float y)
Resets the matrix as identity matrix and translates it.
|
static void |
rotate(float[] matrix,
float degrees)
Preconcats the matrix with the specified rotation.
|
static void |
scale(float[] matrix,
float scaleX,
float scaleY)
Preconcats the matrix with the specified scale.
|
static void |
translate(float[] matrix,
float x,
float y)
Preconcats the matrix with the specified translation.
|
public static float[] create()
public static float[] createIdentity()
public static float[] create(float x,
float y)
x - the translation on xy - the translation on ypublic static void identity(float[] matrix)
matrix - the matrix to initializepublic static void reset(float[] matrix,
float x,
float y)
matrix - the matrix to initializex - the translation on xy - the translation on ypublic static void copy(float[] dest,
float[] src)
dest - the matrix to copy tosrc - the matrix to copy frompublic static void translate(float[] matrix,
float x,
float y)
matrix - the matrix to translatex - the translation on xy - the translation on ypublic static void scale(float[] matrix,
float scaleX,
float scaleY)
matrix - the matrix to scalescaleX - the scale on xscaleY - the scale on ypublic static void rotate(float[] matrix,
float degrees)
matrix - the matrix to rotatedegrees - the degrees to rotatepublic static void concatenate(float[] matrix,
float[] other)
matrix - the matrix to concatother - the matrix to concat with