|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gnu.gleem.linalg.Mat4f
A (very incomplete) 4x4 matrix class. Representation assumes multiplication by column vectors on the right.
| Constructor Summary | |
Mat4f()
Creates new matrix initialized to the zero matrix |
|
| Method Summary | |
float |
get(int i,
int j)
Gets the (i,j)th element of this matrix, where i is the row index and j is the column index |
void |
getColumnMajorData(float[] out)
Copies data in column-major (OpenGL format) order into passed float array, which must have length 16 or greater. |
void |
getRotation(Rotf rot)
Gets the upper left 3x3 of this matrix as a rotation. |
void |
invertRigid()
Inverts this matrix assuming that it represents a rigid transform (i.e., some combination of rotations and translations). |
void |
makeIdent()
Sets this matrix to the identity matrix |
Mat4f |
mul(Mat4f b)
Returns this * b; creates new matrix |
void |
mul(Mat4f a,
Mat4f b)
this = a * b |
void |
set(int i,
int j,
float val)
Sets the (i,j)th element of this matrix, where i is the row index and j is the column index |
void |
set(Mat4f arg)
Sets this matrix to be equivalent to the given one |
void |
setRotation(Rotf rot)
Sets the rotation component of this matrix (i.e., the upper left 3x3) without touching any of the other parts of the matrix |
void |
setRotation(Vec3f x,
Vec3f y,
Vec3f z)
Sets the upper-left 3x3 of this matrix assuming that the given x, y, and z vectors form an orthonormal basis |
void |
setTranslation(Vec3f trans)
Sets the translation component of this matrix (i.e., the three top elements of the third column) without touching any of the other parts of the matrix |
Matf |
toMatf()
|
java.lang.String |
toString()
|
void |
xformDir(Vec3f src,
Vec3f dest)
Transforms src using only the upper left 3x3. |
void |
xformPt(Vec3f src,
Vec3f dest)
Transforms a 3D vector as though it had a homogeneous coordinate and assuming that this matrix represents only rigid transformations; i.e., is not a full transformation. |
void |
xformVec(Vec4f src,
Vec4f dest)
Multiply a 4D vector by this matrix. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Mat4f()
| Method Detail |
public void makeIdent()
public void set(Mat4f arg)
public float get(int i,
int j)
public void set(int i,
int j,
float val)
public void setTranslation(Vec3f trans)
public void setRotation(Rotf rot)
public void setRotation(Vec3f x,
Vec3f y,
Vec3f z)
public void getRotation(Rotf rot)
public void invertRigid()
public Mat4f mul(Mat4f b)
public void mul(Mat4f a,
Mat4f b)
public void xformVec(Vec4f src,
Vec4f dest)
public void xformPt(Vec3f src,
Vec3f dest)
public void xformDir(Vec3f src,
Vec3f dest)
public void getColumnMajorData(float[] out)
public Matf toMatf()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||