Top Description Fields Constructors Methods
javax.vecmath

public Class Matrix3f

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Imports
java.lang.Math

A single precision floating point 3 by 3 matrix. Primarily to support 3D rotations.

Field Summary

Modifier and TypeField and Description
private static final double
public float
m00

The first matrix element in the first row.

public float
m01

The second matrix element in the first row.

public float
m02

The third matrix element in the first row.

public float
m10

The first matrix element in the second row.

public float
m11

The second matrix element in the second row.

public float
m12

The third matrix element in the second row.

public float
m20

The first matrix element in the third row.

public float
m21

The second matrix element in the third row.

public float
m22

The third matrix element in the third row.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
Matrix3f(float
the [0][0] element
m00
,
float
the [0][1] element
m01
,
float
the [0][2] element
m02
,
float
the [1][0] element
m10
,
float
the [1][1] element
m11
,
float
the [1][2] element
m12
,
float
the [2][0] element
m20
,
float
the [2][1] element
m21
,
float
the [2][2] element
m22
)

Constructs and initializes a Matrix3f from the specified nine values.

public
Matrix3f(float[]
the array of length 9 containing in order
v
)

Constructs and initializes a Matrix3f from the specified nine-element array.

public
Matrix3f(Matrix3d
the source matrix
m1
)

Constructs a new matrix with the same values as the Matrix3d parameter.

public
Matrix3f(Matrix3f
the source matrix
m1
)

Constructs a new matrix with the same values as the Matrix3f parameter.

public
Matrix3f()

Constructs and initializes a Matrix3f to all zeros.

Method Summary

Modifier and TypeMethod and Description
public final void
add(float
the scalar adder
scalar
)

Adds a scalar to each component of this matrix.

public final void
add(float
the scalar adder.
scalar
,
Matrix3f
the original matrix values
m1
)

Adds a scalar to each component of the matrix m1 and places the result into this.

public final void
add(Matrix3f
the first matrix
m1
,
Matrix3f
the second matrix
m2
)

Sets the value of this matrix to the matrix sum of matrices m1 and m2.

public final void
add(Matrix3f
the other matrix
m1
)

Sets the value of this matrix to the matrix sum of itself and matrix m1.

public Object

Returns:

a clone of this instance.
clone
()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.
public final float

Returns:

the determinant of this matrix
determinant
()

Computes the determinant of this matrix.

public boolean
epsilonEquals(Matrix3f
the matrix to be compared to this matrix
m1
,
float
the threshold value
epsilon
)

Returns true if the L-infinite distance between this matrix and matrix m1 is less than or equal to the epsilon parameter, otherwise returns false.

public boolean

Returns:

true or false
equals
(Matrix3f
the matrix with which the comparison is made
m1
)

Returns true if all of the data members of Matrix3f m1 are equal to the corresponding data members in this Matrix3f.

public boolean

Returns:

true or false
equals
(Object
the object with which the comparison is made
o1
)

Overrides java.lang.Object.equals.

Returns true if the Object o1 is of type Matrix3f and all of the data members of o1 are equal to the corresponding data members in this Matrix3f.
public final void
getColumn(int
the matrix column
column
,
Vector3f
the vector into which the matrix row values will be copied
v
)

Copies the matrix values in the specified column into the vector parameter.

public final void
getColumn(int
the matrix column
column
,
float[]
the array into which the matrix row values will be copied
v
)

Copies the matrix values in the specified column into the array parameter.

public final float

Returns:

the value at the indexed element.
getElement
(int
the row number to be retrieved (zero indexed)
row
,
int
the column number to be retrieved (zero indexed)
column
)

Retrieves the value at the specified row and column of this matrix.

public final float

Returns:

Returns the m00.
getM00
()

Get the first matrix element in the first row.

public final float

Returns:

Returns the m01.
getM01
()

Get the second matrix element in the first row.

public final float

Returns:

Returns the m02.
getM02
()

Get the third matrix element in the first row.

public final float

Returns:

Returns the m10.
getM10
()

Get first matrix element in the second row.

public final float

Returns:

Returns the m11.
getM11
()

Get second matrix element in the second row.

public final float

Returns:

Returns the m12.
getM12
()

Get the third matrix element in the second row.

public final float

Returns:

Returns the m20.
getM20
()

Get the first matrix element in the third row.

public final float

Returns:

Returns the m21.
getM21
()

Get the second matrix element in the third row.

public final float

Returns:

Returns the m22.
getM22
()

Get the third matrix element in the third row .

public final void
getRow(int
the matrix row
row
,
Vector3f
the vector into which the matrix row values will be copied
v
)

Copies the matrix values in the specified row into the vector parameter.

public final void
getRow(int
the matrix row
row
,
float[]
the array into which the matrix row values will be copied
v
)

Copies the matrix values in the specified row into the array parameter.

public final float

Returns:

the scale factor of this matrix
getScale
()

Performs an SVD normalization of this matrix to calculate and return the uniform scale factor.

pack-priv void
getScaleRotate(double[] scales, double[] rot)

perform SVD (if necessary to get rotational component

public int

Returns:

the integer hash code value
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object.
public final void
invert(Matrix3f
the matrix to be inverted
m1
)

Sets the value of this matrix to the matrix inverse of the passed matrix m1.

public final void
invert()

Inverts this matrix in place.

private final void
invertGeneral(Matrix3f m1)

General invert routine.

pack-priv static void
luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)

Solves a set of linear equations.

pack-priv static boolean

Returns:

true if the matrix is nonsingular, or false otherwise.
luDecomposition
(double[] matrix0, int[] row_perm)

Given a 3x3 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself.

public final void
mul(float
the scalar multiplier
scalar
)

Multiplies each element of this matrix by a scalar.

public final void
mul(float
the scalar multiplier
scalar
,
Matrix3f
the original matrix
m1
)

Multiplies each element of matrix m1 by a scalar and places the result into this.

public final void
mul(Matrix3f
the other matrix
m1
)

Sets the value of this matrix to the result of multiplying itself with matrix m1.

public final void
mul(Matrix3f
the first matrix
m1
,
Matrix3f
the second matrix
m2
)

Sets the value of this matrix to the result of multiplying the two argument matrices together.

public final void
mulNormalize(Matrix3f
the matrix on the right hand side of the multiplication
m1
)

Multiplies this matrix by matrix m1, does an SVD normalization of the result, and places the result back into this matrix.

public final void
mulNormalize(Matrix3f
the matrix on the left hand side of the multiplication
m1
,
Matrix3f
the matrix on the right hand side of the multiplication
m2
)

Multiplies matrix m1 by matrix m2, does an SVD normalization of the result, and places the result into this matrix.

public final void
mulTransposeBoth(Matrix3f
the matrix on the left hand side of the multiplication
m1
,
Matrix3f
the matrix on the right hand side of the multiplication
m2
)

Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.

public final void
mulTransposeLeft(Matrix3f
the matrix on the left hand side of the multiplication
m1
,
Matrix3f
the matrix on the right hand side of the multiplication
m2
)

Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.

public final void
mulTransposeRight(Matrix3f
the matrix on the left hand side of the multiplication
m1
,
Matrix3f
the matrix on the right hand side of the multiplication
m2
)

Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.

public final void
negate()

Negates the value of this matrix: this = -this.

public final void
negate(Matrix3f
the source matrix
m1
)

Sets the value of this matrix equal to the negation of of the Matrix3f parameter.

public final void
normalize()

Performs singular value decomposition normalization of this matrix.

public final void
normalize(Matrix3f
the matrix values to be normalized
m1
)

Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.

public final void
normalizeCP()

Perform cross product normalization of this matrix.

public final void
normalizeCP(Matrix3f
Provides the matrix values to be normalized
m1
)

Perform cross product normalization of matrix m1 and place the normalized values into this.

public final void
rotX(float
the angle to rotate about the X axis in radians
angle
)

Sets the value of this matrix to a counter clockwise rotation about the x axis.

public final void
rotY(float
the angle to rotate about the Y axis in radians
angle
)

Sets the value of this matrix to a counter clockwise rotation about the y axis.

public final void
rotZ(float
the angle to rotate about the Z axis in radians
angle
)

Sets the value of this matrix to a counter clockwise rotation about the z axis.

public final void
set(Quat4f
the quaternion to be converted
q1
)

Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.

public final void
set(AxisAngle4f
the axis and angle to be converted
a1
)

Sets the value of this matrix to the matrix conversion of the (single precision) axis and angle argument.

public final void
set(AxisAngle4d
the axis and angle to be converted
a1
)

Sets the value of this matrix to the matrix conversion of the (double precision) axis and angle argument.

public final void
set(Quat4d
the quaternion to be converted
q1
)

Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.

public final void
set(float[]
the single precision array of length 9
m
)

Sets the values in this Matrix3f equal to the row-major array parameter (ie, the first three elements of the array will be copied into the first row of this matrix, etc.).

public final void
set(Matrix3f
the source matrix3f
m1
)

Sets the value of this matrix to the value of the Matrix3f argument.

public final void
set(Matrix3d
the source matrix3d
m1
)

Sets the value of this matrix to the float value of the Matrix3d argument.

public final void
set(float
the scale factor for the matrix
scale
)

Sets the value of this matrix to a scale matrix with the passed scale amount.

public final void
setColumn(int
the column number to be modified (zero indexed)
column
,
float
the first row element
x
,
float
the second row element
y
,
float
the third row element
z
)

Sets the specified column of this matrix3f to the three values provided.

public final void
setColumn(int
the column number to be modified (zero indexed)
column
,
Vector3f
the replacement column
v
)

Sets the specified column of this matrix3f to the vector provided.

public final void
setColumn(int
the column number to be modified (zero indexed)
column
,
float[]
the replacement column
v
)

Sets the specified column of this matrix3f to the three values provided.

public final void
setElement(int
the row number to be modified (zero indexed)
row
,
int
the column number to be modified (zero indexed)
column
,
float
the new value
value
)

Sets the specified element of this matrix3f to the value provided.

public final void
setIdentity()

Sets this Matrix3f to identity.

public final void
setM00(float
The m00 to set.
m00
)

Set the first matrix element in the first row.

public final void
setM01(float
The m01 to set.
m01
)

Set the second matrix element in the first row.

public final void
setM02(float
The m02 to set.
m02
)

Set the third matrix element in the first row.

public final void
setM10(float
The m10 to set.
m10
)

Set first matrix element in the second row.

public final void
setM11(float
The m11 to set.
m11
)

Set the second matrix element in the second row.

public final void
setM12(float
The m12 to set.
m12
)

Set the third matrix element in the second row.

public final void
setM20(float
The m20 to set.
m20
)

Set the first matrix element in the third row.

public final void
setM21(float
The m21 to set.
m21
)

Set the second matrix element in the third row.

public final void
setM22(float
The m22 to set.
m22
)

Set the third matrix element in the third row.

public final void
setRow(int
the row number to be modified (zero indexed)
row
,
float
the first column element
x
,
float
the second column element
y
,
float
the third column element
z
)

Sets the specified row of this matrix3f to the three values provided.

public final void
setRow(int
the row number to be modified (zero indexed)
row
,
Vector3f
the replacement row
v
)

Sets the specified row of this matrix3f to the Vector provided.

public final void
setRow(int
the row number to be modified (zero indexed)
row
,
float[]
the replacement row
v
)

Sets the specified row of this matrix3f to the three values provided.

public final void
setScale(float
the new scale amount
scale
)

Sets the scale component of the current matrix by factoring out the current scale (by doing an SVD) and multiplying by the new scale.

public final void
setZero()

Sets this matrix to all zeros.

public final void
sub(Matrix3f
the first matrix
m1
,
Matrix3f
the second matrix
m2
)

Sets the value of this matrix to the matrix difference of matrices m1 and m2.

public final void
sub(Matrix3f
the other matrix
m1
)

Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).

public String

Returns:

the String representation
toString
()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this Matrix3f.
public final void
transform(Tuple3f
the tuple to be multiplied by this matrix and then replaced
t
)

Multiply this matrix by the tuple t and place the result back into the tuple (t = this*t).

public final void
transform(Tuple3f
the tuple to be multiplied by this matrix
t
,
Tuple3f
the tuple into which the product is placed
result
)

Multiply this matrix by the tuple t and and place the result into the tuple "result" (result = this*t).

public final void
transpose()

Sets the value of this matrix to its transpose.

public final void
transpose(Matrix3f
the matrix to be transposed
m1
)

Sets the value of this matrix to the transpose of the argument matrix.

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

EPSback to summary
private static final double EPS
m00back to summary
public float m00

The first matrix element in the first row.

m01back to summary
public float m01

The second matrix element in the first row.

m02back to summary
public float m02

The third matrix element in the first row.

m10back to summary
public float m10

The first matrix element in the second row.

m11back to summary
public float m11

The second matrix element in the second row.

m12back to summary
public float m12

The third matrix element in the second row.

m20back to summary
public float m20

The first matrix element in the third row.

m21back to summary
public float m21

The second matrix element in the third row.

m22back to summary
public float m22

The third matrix element in the third row.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Constructor Detail

Matrix3fback to summary
public Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)

Constructs and initializes a Matrix3f from the specified nine values.

Parameters
m00:float

the [0][0] element

m01:float

the [0][1] element

m02:float

the [0][2] element

m10:float

the [1][0] element

m11:float

the [1][1] element

m12:float

the [1][2] element

m20:float

the [2][0] element

m21:float

the [2][1] element

m22:float

the [2][2] element

Matrix3fback to summary
public Matrix3f(float[] v)

Constructs and initializes a Matrix3f from the specified nine-element array. this.m00 =v[0], this.m01=v[1], etc.

Parameters
v:float[]

the array of length 9 containing in order

Matrix3fback to summary
public Matrix3f(Matrix3d m1)

Constructs a new matrix with the same values as the Matrix3d parameter.

Parameters
m1:Matrix3d

the source matrix

Matrix3fback to summary
public Matrix3f(Matrix3f m1)

Constructs a new matrix with the same values as the Matrix3f parameter.

Parameters
m1:Matrix3f

the source matrix

Matrix3fback to summary
public Matrix3f()

Constructs and initializes a Matrix3f to all zeros.

Method Detail

addback to summary
public final void add(float scalar)

Adds a scalar to each component of this matrix.

Parameters
scalar:float

the scalar adder

addback to summary
public final void add(float scalar, Matrix3f m1)

Adds a scalar to each component of the matrix m1 and places the result into this. Matrix m1 is not modified.

Parameters
scalar:float

the scalar adder.

m1:Matrix3f

the original matrix values

addback to summary
public final void add(Matrix3f m1, Matrix3f m2)

Sets the value of this matrix to the matrix sum of matrices m1 and m2.

Parameters
m1:Matrix3f

the first matrix

m2:Matrix3f

the second matrix

addback to summary
public final void add(Matrix3f m1)

Sets the value of this matrix to the matrix sum of itself and matrix m1.

Parameters
m1:Matrix3f

the other matrix

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.

Returns:Object

a clone of this instance.

Exceptions
OutOfMemoryError:
if there is not enough memory.
Since
vecmath 1.3
See Also
java.lang.Cloneable
determinantback to summary
public final float determinant()

Computes the determinant of this matrix.

Returns:float

the determinant of this matrix

epsilonEqualsback to summary
public boolean epsilonEquals(Matrix3f m1, float epsilon)

Returns true if the L-infinite distance between this matrix and matrix m1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[i=0,1,2 ; j=0,1,2 ; abs(this.m(i,j) - m1.m(i,j)]

Parameters
m1:Matrix3f

the matrix to be compared to this matrix

epsilon:float

the threshold value

equalsback to summary
public boolean equals(Matrix3f m1)

Returns true if all of the data members of Matrix3f m1 are equal to the corresponding data members in this Matrix3f.

Parameters
m1:Matrix3f

the matrix with which the comparison is made

Returns:boolean

true or false

equalsback to summary
public boolean equals(Object o1)

Overrides java.lang.Object.equals.

Returns true if the Object o1 is of type Matrix3f and all of the data members of o1 are equal to the corresponding data members in this Matrix3f.

Parameters
o1:Object

the object with which the comparison is made

Returns:boolean

true or false

getColumnback to summary
public final void getColumn(int column, Vector3f v)

Copies the matrix values in the specified column into the vector parameter.

Parameters
column:int

the matrix column

v:Vector3f

the vector into which the matrix row values will be copied

getColumnback to summary
public final void getColumn(int column, float[] v)

Copies the matrix values in the specified column into the array parameter.

Parameters
column:int

the matrix column

v:float[]

the array into which the matrix row values will be copied

getElementback to summary
public final float getElement(int row, int column)

Retrieves the value at the specified row and column of this matrix.

Parameters
row:int

the row number to be retrieved (zero indexed)

column:int

the column number to be retrieved (zero indexed)

Returns:float

the value at the indexed element.

getM00back to summary
public final float getM00()

Get the first matrix element in the first row.

Returns:float

Returns the m00.

Since
vecmath 1.5
getM01back to summary
public final float getM01()

Get the second matrix element in the first row.

Returns:float

Returns the m01.

Since
vecmath 1.5
getM02back to summary
public final float getM02()

Get the third matrix element in the first row.

Returns:float

Returns the m02.

Since
vecmath 1.5
getM10back to summary
public final float getM10()

Get first matrix element in the second row.

Returns:float

Returns the m10.

Since
vecmath 1.5
getM11back to summary
public final float getM11()

Get second matrix element in the second row.

Returns:float

Returns the m11.

Since
vecmath 1.5
getM12back to summary
public final float getM12()

Get the third matrix element in the second row.

Returns:float

Returns the m12.

Since
vecmath 1.5
getM20back to summary
public final float getM20()

Get the first matrix element in the third row.

Returns:float

Returns the m20.

Since
vecmath 1.5
getM21back to summary
public final float getM21()

Get the second matrix element in the third row.

Returns:float

Returns the m21.

Since
vecmath 1.5
getM22back to summary
public final float getM22()

Get the third matrix element in the third row .

Returns:float

Returns the m22.

Since
vecmath 1.5
getRowback to summary
public final void getRow(int row, Vector3f v)

Copies the matrix values in the specified row into the vector parameter.

Parameters
row:int

the matrix row

v:Vector3f

the vector into which the matrix row values will be copied

getRowback to summary
public final void getRow(int row, float[] v)

Copies the matrix values in the specified row into the array parameter.

Parameters
row:int

the matrix row

v:float[]

the array into which the matrix row values will be copied

getScaleback to summary
public final float getScale()

Performs an SVD normalization of this matrix to calculate and return the uniform scale factor. If the matrix has non-uniform scale factors, the largest of the x, y, and z scale factors will be returned. This matrix is not modified.

Returns:float

the scale factor of this matrix

getScaleRotateback to summary
pack-priv void getScaleRotate(double[] scales, double[] rot)

perform SVD (if necessary to get rotational component

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object. Two different Matrix3f objects with identical data values (i.e., Matrix3f.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.

Returns:int

the integer hash code value

invertback to summary
public final void invert(Matrix3f m1)

Sets the value of this matrix to the matrix inverse of the passed matrix m1.

Parameters
m1:Matrix3f

the matrix to be inverted

invertback to summary
public final void invert()

Inverts this matrix in place.

invertGeneralback to summary
private final void invertGeneral(Matrix3f m1)

General invert routine. Inverts m1 and places the result in "this". Note that this routine handles both the "this" version and the non-"this" version. Also note that since this routine is slow anyway, we won't worry about allocating a little bit of garbage.

luBacksubstitutionback to summary
pack-priv static void luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)

Solves a set of linear equations. The input parameters "matrix1", and "row_perm" come from luDecompostionD3x3 and do not change here. The parameter "matrix2" is a set of column vectors assembled into a 3x3 matrix of floating-point values. The procedure takes each column of "matrix2" in turn and treats it as the right-hand side of the matrix equation Ax = LUx = b. The solution vector replaces the original column of the matrix. If "matrix2" is the identity matrix, the procedure replaces its contents with the inverse of the matrix from which "matrix1" was originally derived.

luDecompositionback to summary
pack-priv static boolean luDecomposition(double[] matrix0, int[] row_perm)

Given a 3x3 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself. The input parameters are "matrix0" and "dimen". The array "matrix0" is also an output parameter. The vector "row_perm[3]" is an output parameter that contains the row permutations resulting from partial pivoting. The output parameter "even_row_xchg" is 1 when the number of row exchanges is even, or -1 otherwise. Assumes data type is always double. This function is similar to luDecomposition, except that it is tuned specifically for 3x3 matrices.

Returns:boolean

true if the matrix is nonsingular, or false otherwise.

mulback to summary
public final void mul(float scalar)

Multiplies each element of this matrix by a scalar.

Parameters
scalar:float

the scalar multiplier

mulback to summary
public final void mul(float scalar, Matrix3f m1)

Multiplies each element of matrix m1 by a scalar and places the result into this. Matrix m1 is not modified.

Parameters
scalar:float

the scalar multiplier

m1:Matrix3f

the original matrix

mulback to summary
public final void mul(Matrix3f m1)

Sets the value of this matrix to the result of multiplying itself with matrix m1.

Parameters
m1:Matrix3f

the other matrix

mulback to summary
public final void mul(Matrix3f m1, Matrix3f m2)

Sets the value of this matrix to the result of multiplying the two argument matrices together.

Parameters
m1:Matrix3f

the first matrix

m2:Matrix3f

the second matrix

mulNormalizeback to summary
public final void mulNormalize(Matrix3f m1)

Multiplies this matrix by matrix m1, does an SVD normalization of the result, and places the result back into this matrix. this = SVDnorm(this*m1).

Parameters
m1:Matrix3f

the matrix on the right hand side of the multiplication

mulNormalizeback to summary
public final void mulNormalize(Matrix3f m1, Matrix3f m2)

Multiplies matrix m1 by matrix m2, does an SVD normalization of the result, and places the result into this matrix. this = SVDnorm(m1*m2).

Parameters
m1:Matrix3f

the matrix on the left hand side of the multiplication

m2:Matrix3f

the matrix on the right hand side of the multiplication

mulTransposeBothback to summary
public final void mulTransposeBoth(Matrix3f m1, Matrix3f m2)

Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.

Parameters
m1:Matrix3f

the matrix on the left hand side of the multiplication

m2:Matrix3f

the matrix on the right hand side of the multiplication

mulTransposeLeftback to summary
public final void mulTransposeLeft(Matrix3f m1, Matrix3f m2)

Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.

Parameters
m1:Matrix3f

the matrix on the left hand side of the multiplication

m2:Matrix3f

the matrix on the right hand side of the multiplication

mulTransposeRightback to summary
public final void mulTransposeRight(Matrix3f m1, Matrix3f m2)

Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.

Parameters
m1:Matrix3f

the matrix on the left hand side of the multiplication

m2:Matrix3f

the matrix on the right hand side of the multiplication

negateback to summary
public final void negate()

Negates the value of this matrix: this = -this.

negateback to summary
public final void negate(Matrix3f m1)

Sets the value of this matrix equal to the negation of of the Matrix3f parameter.

Parameters
m1:Matrix3f

the source matrix

normalizeback to summary
public final void normalize()

Performs singular value decomposition normalization of this matrix.

normalizeback to summary
public final void normalize(Matrix3f m1)

Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.

Parameters
m1:Matrix3f

the matrix values to be normalized

normalizeCPback to summary
public final void normalizeCP()

Perform cross product normalization of this matrix.

normalizeCPback to summary
public final void normalizeCP(Matrix3f m1)

Perform cross product normalization of matrix m1 and place the normalized values into this.

Parameters
m1:Matrix3f

Provides the matrix values to be normalized

rotXback to summary
public final void rotX(float angle)

Sets the value of this matrix to a counter clockwise rotation about the x axis.

Parameters
angle:float

the angle to rotate about the X axis in radians

rotYback to summary
public final void rotY(float angle)

Sets the value of this matrix to a counter clockwise rotation about the y axis.

Parameters
angle:float

the angle to rotate about the Y axis in radians

rotZback to summary
public final void rotZ(float angle)

Sets the value of this matrix to a counter clockwise rotation about the z axis.

Parameters
angle:float

the angle to rotate about the Z axis in radians

setback to summary
public final void set(Quat4f q1)

Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.

Parameters
q1:Quat4f

the quaternion to be converted

setback to summary
public final void set(AxisAngle4f a1)

Sets the value of this matrix to the matrix conversion of the (single precision) axis and angle argument.

Parameters
a1:AxisAngle4f

the axis and angle to be converted

setback to summary
public final void set(AxisAngle4d a1)

Sets the value of this matrix to the matrix conversion of the (double precision) axis and angle argument.

Parameters
a1:AxisAngle4d

the axis and angle to be converted

setback to summary
public final void set(Quat4d q1)

Sets the value of this matrix to the matrix conversion of the (single precision) quaternion argument.

Parameters
q1:Quat4d

the quaternion to be converted

setback to summary
public final void set(float[] m)

Sets the values in this Matrix3f equal to the row-major array parameter (ie, the first three elements of the array will be copied into the first row of this matrix, etc.).

Parameters
m:float[]

the single precision array of length 9

setback to summary
public final void set(Matrix3f m1)

Sets the value of this matrix to the value of the Matrix3f argument.

Parameters
m1:Matrix3f

the source matrix3f

setback to summary
public final void set(Matrix3d m1)

Sets the value of this matrix to the float value of the Matrix3d argument.

Parameters
m1:Matrix3d

the source matrix3d

setback to summary
public final void set(float scale)

Sets the value of this matrix to a scale matrix with the passed scale amount.

Parameters
scale:float

the scale factor for the matrix

setColumnback to summary
public final void setColumn(int column, float x, float y, float z)

Sets the specified column of this matrix3f to the three values provided.

Parameters
column:int

the column number to be modified (zero indexed)

x:float

the first row element

y:float

the second row element

z:float

the third row element

setColumnback to summary
public final void setColumn(int column, Vector3f v)

Sets the specified column of this matrix3f to the vector provided.

Parameters
column:int

the column number to be modified (zero indexed)

v:Vector3f

the replacement column

setColumnback to summary
public final void setColumn(int column, float[] v)

Sets the specified column of this matrix3f to the three values provided.

Parameters
column:int

the column number to be modified (zero indexed)

v:float[]

the replacement column

setElementback to summary
public final void setElement(int row, int column, float value)

Sets the specified element of this matrix3f to the value provided.

Parameters
row:int

the row number to be modified (zero indexed)

column:int

the column number to be modified (zero indexed)

value:float

the new value

setIdentityback to summary
public final void setIdentity()

Sets this Matrix3f to identity.

setM00back to summary
public final void setM00(float m00)

Set the first matrix element in the first row.

Parameters
m00:float

The m00 to set.

Since
vecmath 1.5
setM01back to summary
public final void setM01(float m01)

Set the second matrix element in the first row.

Parameters
m01:float

The m01 to set.

Since
vecmath 1.5
setM02back to summary
public final void setM02(float m02)

Set the third matrix element in the first row.

Parameters
m02:float

The m02 to set.

Since
vecmath 1.5
setM10back to summary
public final void setM10(float m10)

Set first matrix element in the second row.

Parameters
m10:float

The m10 to set.

Since
vecmath 1.5
setM11back to summary
public final void setM11(float m11)

Set the second matrix element in the second row.

Parameters
m11:float

The m11 to set.

Since
vecmath 1.5
setM12back to summary
public final void setM12(float m12)

Set the third matrix element in the second row.

Parameters
m12:float

The m12 to set.

Since
vecmath 1.5
setM20back to summary
public final void setM20(float m20)

Set the first matrix element in the third row.

Parameters
m20:float

The m20 to set.

Since
vecmath 1.5
setM21back to summary
public final void setM21(float m21)

Set the second matrix element in the third row.

Parameters
m21:float

The m21 to set.

Since
vecmath 1.5
setM22back to summary
public final void setM22(float m22)

Set the third matrix element in the third row.

Parameters
m22:float

The m22 to set.

Since
vecmath 1.5
setRowback to summary
public final void setRow(int row, float x, float y, float z)

Sets the specified row of this matrix3f to the three values provided.

Parameters
row:int

the row number to be modified (zero indexed)

x:float

the first column element

y:float

the second column element

z:float

the third column element

setRowback to summary
public final void setRow(int row, Vector3f v)

Sets the specified row of this matrix3f to the Vector provided.

Parameters
row:int

the row number to be modified (zero indexed)

v:Vector3f

the replacement row

setRowback to summary
public final void setRow(int row, float[] v)

Sets the specified row of this matrix3f to the three values provided.

Parameters
row:int

the row number to be modified (zero indexed)

v:float[]

the replacement row

setScaleback to summary
public final void setScale(float scale)

Sets the scale component of the current matrix by factoring out the current scale (by doing an SVD) and multiplying by the new scale.

Parameters
scale:float

the new scale amount

setZeroback to summary
public final void setZero()

Sets this matrix to all zeros.

subback to summary
public final void sub(Matrix3f m1, Matrix3f m2)

Sets the value of this matrix to the matrix difference of matrices m1 and m2.

Parameters
m1:Matrix3f

the first matrix

m2:Matrix3f

the second matrix

subback to summary
public final void sub(Matrix3f m1)

Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).

Parameters
m1:Matrix3f

the other matrix

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this Matrix3f.

Returns:String

the String representation

transformback to summary
public final void transform(Tuple3f t)

Multiply this matrix by the tuple t and place the result back into the tuple (t = this*t).

Parameters
t:Tuple3f

the tuple to be multiplied by this matrix and then replaced

transformback to summary
public final void transform(Tuple3f t, Tuple3f result)

Multiply this matrix by the tuple t and and place the result into the tuple "result" (result = this*t).

Parameters
t:Tuple3f

the tuple to be multiplied by this matrix

result:Tuple3f

the tuple into which the product is placed

transposeback to summary
public final void transpose()

Sets the value of this matrix to its transpose.

transposeback to summary
public final void transpose(Matrix3f m1)

Sets the value of this matrix to the transpose of the argument matrix.

Parameters
m1:Matrix3f

the matrix to be transposed