atavism.server.math
Class Matrix4
java.lang.Object
atavism.server.math.Matrix4
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable<Matrix4>
public class Matrix4
- extends java.lang.Object
- implements java.lang.Comparable<Matrix4>, java.lang.Cloneable
Constructor Summary |
Matrix4()
|
Matrix4(float m00,
float m01,
float m02,
float m03,
float m10,
float m11,
float m12,
float m13,
float m20,
float m21,
float m22,
float m23,
float m30,
float m31,
float m32,
float m33)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Matrix4
public Matrix4()
Matrix4
public Matrix4(float m00,
float m01,
float m02,
float m03,
float m10,
float m11,
float m12,
float m13,
float m20,
float m21,
float m22,
float m23,
float m30,
float m31,
float m32,
float m33)
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
get
public float get(int row,
int column)
set
public void set(int row,
int column,
float val)
translate
public Matrix4 translate(AOVector vec)
rotate
public Matrix4 rotate(Quaternion rot)
multiply
public static Matrix4 multiply(Matrix4 left,
Matrix4 right)
multiply
public Matrix4 multiply(Matrix4 other)
multiply
public static Matrix4 multiply(float scalar,
Matrix4 transform)
multiply
public Matrix4 multiply(float scalar)
multiply
public static AOVector multiply(Matrix4 matrix,
AOVector vector)
multiply
public static Plane multiply(Matrix4 transform,
Plane plane)
equals
public boolean equals(Matrix4 other)
compareTo
public int compareTo(Matrix4 other)
- Specified by:
compareTo
in interface java.lang.Comparable<Matrix4>
fromRotation
public static Matrix4 fromRotation(Quaternion rot)
fromTranslation
public static Matrix4 fromTranslation(AOVector vec)
getTranslation
public AOVector getTranslation()
setTranslation
public void setTranslation(AOVector vec)
setRotation
public void setRotation(Quaternion rot)
- Sets the rotation of the matrix. This will overwrite any modifications
to the scale of the matrix.
- Parameters:
rot
-
getInverse
public Matrix4 getInverse()
getDeterminant
public float getDeterminant()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object