public class Mat4f extends Object
| Modifier and Type | Field and Description |
|---|---|
private float[] |
data |
| Constructor and Description |
|---|
Mat4f()
Creates new matrix initialized to the zero matrix
|
Mat4f(Mat4f arg)
Creates new matrix initialized to argument's contents
|
| Modifier and Type | Method and Description |
|---|---|
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 |
setScale(Vec3f scale)
Sets the elements (0, 0), (1, 1), and (2, 2) with the
appropriate elements of the given three-dimensional scale
vector.
|
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() |
String |
toString() |
void |
transpose()
Transpose this matrix in place.
|
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.
|
public Mat4f()
public Mat4f(Mat4f arg)
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 setScale(Vec3f scale)
mul for that.public void invertRigid()
public void transpose()
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()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.