Package heronarts.lx.transform
Class LXMatrix
java.lang.Object
heronarts.lx.transform.LXMatrix
- Direct Known Subclasses:
LXParameterizedMatrix
A 4x4 matrix for 3-D transformations
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionidentity()
Resets this matrix to the identity matrixmultiply
(float b11, float b12, float b13, float b14, float b21, float b22, float b23, float b24, float b31, float b32, float b33, float b34, float b41, float b42, float b43, float b44) Multiplies the matrix by another matrixrotateX
(float rx) rotateY
(float ry) rotateZ
(float rz) scale
(float sv) scale
(float sx, float sy, float sz) scaleX
(float sx) scaleY
(float sy) scaleZ
(float sz) set
(float[] m) shearXY
(float rz) shearXZ
(float ry) shearYX
(float rz) shearYZ
(float rx) shearZX
(float ry) shearZY
(float rx) toString()
translate
(float tx, float ty, float tz) translateX
(float tx) translateY
(float ty) translateZ
(float tz) float
x()
float
Returns the normalized x value after the given point is transformed by this matrix.float
y()
float
Returns the normalized y value after the given point is transformed by this matrix.float
z()
float
Returns the normalized z value after the given point is transformed by this matrix.
-
Field Details
-
m11
public float m11 -
m12
public float m12 -
m13
public float m13 -
m14
public float m14 -
m21
public float m21 -
m22
public float m22 -
m23
public float m23 -
m24
public float m24 -
m31
public float m31 -
m32
public float m32 -
m33
public float m33 -
m34
public float m34 -
m41
public float m41 -
m42
public float m42 -
m43
public float m43 -
m44
public float m44
-
-
Constructor Details
-
LXMatrix
public LXMatrix()Makes a new identity matrix. -
LXMatrix
public LXMatrix(float[] m) -
LXMatrix
public LXMatrix(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) -
LXMatrix
Copies the existing matrix- Parameters:
that
- matrix
-
-
Method Details
-
multiply
Multiplies the matrix by another matrix- Parameters:
m
- Matrix to multiply by- Returns:
- this
-
multiply
public LXMatrix multiply(float b11, float b12, float b13, float b14, float b21, float b22, float b23, float b24, float b31, float b32, float b33, float b34, float b41, float b42, float b43, float b44) -
x
public float x() -
y
public float y() -
z
public float z() -
xn
Returns the normalized x value after the given point is transformed by this matrix.- Parameters:
p
- Point- Returns:
- xn value after application of matrix
-
yn
Returns the normalized y value after the given point is transformed by this matrix.- Parameters:
p
- Point- Returns:
- yn value after application of matrix
-
zn
Returns the normalized z value after the given point is transformed by this matrix.- Parameters:
p
- Point- Returns:
- zn value after application of matrix
-
scale
-
scaleX
-
scaleY
-
scaleZ
-
scale
-
translateX
-
translateY
-
translateZ
-
translate
-
rotateX
-
rotateY
-
rotateZ
-
shearXY
-
shearYX
-
shearYZ
-
shearZY
-
shearZX
-
shearXZ
-
set
-
set
-
identity
Resets this matrix to the identity matrix- Returns:
- this
-
toString
-