|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.geom.Matrix4x4
public class Matrix4x4
Implements a simple row-major 4x4 matrix class, all matrix operations are
applied to new instances. Use transpose()
to convert from
column-major formats...
Field Summary | |
---|---|
double[][] |
matrix
|
Constructor Summary | |
---|---|
Matrix4x4()
|
|
Matrix4x4(double[] array)
Initialising constructor from a 1d array. |
|
Matrix4x4(double v11,
double v12,
double v13,
double v14,
double v21,
double v22,
double v23,
double v24,
double v31,
double v32,
double v33,
double v34,
double v41,
double v42,
double v43,
double v44)
|
|
Matrix4x4(Matrix4x4 m)
|
Method Summary | |
---|---|
Matrix4x4 |
add(Matrix4x4 rhs)
|
Matrix4x4 |
addSelf(Matrix4x4 m)
|
Vec3D |
applyTo(ReadonlyVec3D v)
Creates a copy of the given vector, transformed by this matrix. |
Vec3D |
applyToSelf(Vec3D v)
|
Matrix4x4 |
copy()
|
Matrix4x4 |
getInverted()
|
Matrix4x4 |
getRotatedAroundAxis(ReadonlyVec3D axis,
double theta)
|
Matrix4x4 |
getRotatedX(double theta)
|
Matrix4x4 |
getRotatedY(double theta)
|
Matrix4x4 |
getRotatedZ(double theta)
|
Matrix4x4 |
getTransposed()
|
Matrix4x4 |
identity()
|
Matrix4x4 |
invert()
Matrix Inversion using Cramer's Method Computes Adjoint matrix divided by determinant Code modified from http://www.intel.com/design/pentiumiii/sml/24504301.pdf |
Matrix4x4 |
multiply(double factor)
|
Matrix4x4 |
multiply(Matrix4x4 mat)
Matrix-Matrix Right-multiplication. |
Matrix4x4 |
multiplySelf(double factor)
In-place matrix-scalar multiplication. |
Matrix4x4 |
multiplySelf(Matrix4x4 mat)
|
Matrix4x4 |
rotateAroundAxis(ReadonlyVec3D axis,
double theta)
Applies rotation about arbitrary axis to matrix |
Matrix4x4 |
rotateX(double theta)
Applies rotation about X to this matrix. |
Matrix4x4 |
rotateY(double theta)
Applies rotation about Y to this matrix. |
Matrix4x4 |
rotateZ(double theta)
|
Matrix4x4 |
scale(double scale)
|
Matrix4x4 |
scale(double scaleX,
double scaleY,
double scaleZ)
|
Matrix4x4 |
scale(ReadonlyVec3D scale)
|
Matrix4x4 |
scaleSelf(double scale)
|
Matrix4x4 |
scaleSelf(double scaleX,
double scaleY,
double scaleZ)
|
Matrix4x4 |
scaleSelf(ReadonlyVec3D scale)
|
Matrix4x4 |
set(double a,
double b,
double c,
double d,
double e,
double f,
double g,
double h,
double i,
double j,
double k,
double l,
double m,
double n,
double o,
double p)
|
Matrix4x4 |
set(Matrix4x4 mat)
|
Matrix4x4 |
sub(Matrix4x4 m)
|
Matrix4x4 |
subSelf(Matrix4x4 mat)
|
double[] |
toArray(double[] result)
Copies all matrix elements into an linear array. |
float[] |
toFloatArray(float[] result)
|
java.lang.String |
toString()
|
float[] |
toTransposedFloatArray(float[] result)
|
Matrix4x4 |
translate(double dx,
double dy,
double dz)
|
Matrix4x4 |
translate(ReadonlyVec3D trans)
|
Matrix4x4 |
translateSelf(double dx,
double dy,
double dz)
|
Matrix4x4 |
translateSelf(ReadonlyVec3D trans)
|
Matrix4x4 |
transpose()
Converts the matrix (in-place) between column-major to row-major order (and vice versa). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double[][] matrix
Constructor Detail |
---|
public Matrix4x4()
public Matrix4x4(double v11, double v12, double v13, double v14, double v21, double v22, double v23, double v24, double v31, double v32, double v33, double v34, double v41, double v42, double v43, double v44)
public Matrix4x4(double[] array)
array
- public Matrix4x4(Matrix4x4 m)
Method Detail |
---|
public Matrix4x4 add(Matrix4x4 rhs)
public Matrix4x4 addSelf(Matrix4x4 m)
public Vec3D applyTo(ReadonlyVec3D v)
v
-
public Vec3D applyToSelf(Vec3D v)
public Matrix4x4 copy()
public Matrix4x4 getInverted()
public Matrix4x4 getRotatedAroundAxis(ReadonlyVec3D axis, double theta)
public Matrix4x4 getRotatedX(double theta)
public Matrix4x4 getRotatedY(double theta)
public Matrix4x4 getRotatedZ(double theta)
public Matrix4x4 getTransposed()
public Matrix4x4 identity()
public Matrix4x4 invert()
public Matrix4x4 multiply(double factor)
public Matrix4x4 multiply(Matrix4x4 mat)
mat
-
public Matrix4x4 multiplySelf(double factor)
factor
-
public Matrix4x4 multiplySelf(Matrix4x4 mat)
public Matrix4x4 rotateAroundAxis(ReadonlyVec3D axis, double theta)
axis
- theta
-
public Matrix4x4 rotateX(double theta)
theta
- rotation angle in radians
public Matrix4x4 rotateY(double theta)
theta
- rotation angle in radians
public Matrix4x4 rotateZ(double theta)
public Matrix4x4 scale(double scale)
public Matrix4x4 scale(double scaleX, double scaleY, double scaleZ)
public Matrix4x4 scale(ReadonlyVec3D scale)
public Matrix4x4 scaleSelf(double scale)
public Matrix4x4 scaleSelf(double scaleX, double scaleY, double scaleZ)
public Matrix4x4 scaleSelf(ReadonlyVec3D scale)
public Matrix4x4 set(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j, double k, double l, double m, double n, double o, double p)
public Matrix4x4 set(Matrix4x4 mat)
public Matrix4x4 sub(Matrix4x4 m)
public Matrix4x4 subSelf(Matrix4x4 mat)
public double[] toArray(double[] result)
result
- array (or null to create a new one)
public float[] toFloatArray(float[] result)
public java.lang.String toString()
toString
in class java.lang.Object
public float[] toTransposedFloatArray(float[] result)
public Matrix4x4 translate(double dx, double dy, double dz)
public Matrix4x4 translate(ReadonlyVec3D trans)
public Matrix4x4 translateSelf(double dx, double dy, double dz)
public Matrix4x4 translateSelf(ReadonlyVec3D trans)
public Matrix4x4 transpose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |