All Packages Class Hierarchy This Package Previous Next Index
Class java.vecmath.Matrix3f
java.lang.Object
|
+----java.vecmath.Matrix3f
- public class Matrix3f
- extends Object
A single precision floating point 3 by 3 matrix.
-
m00
- The matrix element that maps x into x'.
-
m01
- The matrix element that maps y into x'.
-
m02
- The matrix element that maps z into x'.
-
m10
- The matrix element that maps x into y'.
-
m11
- The matrix element that maps y into y'.
-
m12
- The matrix element that maps z into y'.
-
m20
- The matrix element that maps x into z'.
-
m21
- The matrix element that maps y into z'.
-
m22
- The matrix element that maps z into z'.
-
Matrix3f()
- Constructs and initializes a Matrix3f to all zeros.
-
Matrix3f(float, float, float, float, float, float, float, float, float)
- Constructs and initializes a Matrix3f from the specified nine values.
-
Matrix3f(float[])
- Constructs and initializes a Matrix3f from the specified nine-
element array.
-
Matrix3f(Matrix3d)
-
Constructs a new matrix with the same values as the
Matrix3d parameter.
-
Matrix3f(Matrix3f)
- Constructs a new matrix with the same values as the
Matrix3f parameter.
-
add(Matrix3f)
- Sets the value of this matrix to the matrix sum of itself and
matrix m1.
-
add(Matrix3f, Matrix3f)
- Sets the value of this matrix to the matrix sum of matrices m1 and m2.
-
determinant()
- Computes the determinant of this matrix.
-
epsilonEquals(Matrix3f, float)
- 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.
-
equals(Matrix3f)
- Returns true if all of the data members of Matrix3f m1 are
equal to the corresponding data members in this Matrix3f.
-
getElement(int, int)
- Retrieves the value at the specified row and column of this
matrix.
-
hashCode()
- Returns a hash number based on the data values in this
object.
-
invert()
- Inverts this matrix in place.
-
invert(Matrix3f)
- Sets the value of this matrix to the matrix inverse
of the passed matrix m1.
-
mul(Matrix3f)
- Sets the value of this matrix to the result of multiplying itself
with matrix m1.
-
mul(Matrix3f, Matrix3f)
- Sets the value of this matrix to the result of multiplying
the two argument matrices together.
-
mulNormalize(Matrix3f)
- 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).
-
mulNormalize(Matrix3f, Matrix3f)
- Multiplies matrix m1 by matrix m2, does an SVD normalization
of the result, and places the result into this matrix
this = SVDnorm(m1*m2).
-
mulTransposeBoth(Matrix3f, Matrix3f)
- Multiplies the transpose of matrix m1 times the transpose of matrix
m2, and places the result into this.
-
mulTransposeLeft(Matrix3f, Matrix3f)
-
Multiplies the transpose of matrix m1 times matrix m2, and
places the result into this.
-
mulTransposeRight(Matrix3f, Matrix3f)
-
Multiplies matrix m1 times the transpose of matrix m2, and
places the result into this.
-
negate()
- Negates the value of this matrix: this = -this.
-
negate(Matrix3f)
- Sets the value of this matrix equal to the negation of
of the Matrix3f parameter.
-
normalize()
- Performs singular value decomposition normalization of this matrix.
-
normalize(Matrix3f)
-
Perform singular value decomposition normalization of matrix m1
and place the normalized values into this.
-
normalizeCP()
- Perform cross product normalization of this matrix.
-
normalizeCP(Matrix3f)
- Perform cross product normalization of matrix m1 and place the
normalized values into this.
-
rotX(float)
- Sets the value of this matrix to a rotation matrix about the x axis
by the passed angle.
-
rotY(float)
- Sets the value of this matrix to a rotation matrix about the y axis
by the passed angle.
-
rotZ(float)
- Sets the value of this matrix to a rotation matrix about the z axis
by the passed angle.
-
set(AxisAngle4d)
-
-
set(AxisAngle4f)
- Sets the value of this matrix to the matrix conversion of the
(single precision) axis and angle argument.
-
set(float)
- Sets the value of this matrix to a scale matrix with
the passed scale amount.
-
set(float[])
-
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.).
-
set(Quat4d)
- Sets the value of this matrix to the matrix conversion of the
(single precision) quaternion argument.
-
set(Quat4f)
- Sets the value of this matrix to the matrix conversion of the
(single precision) quaternion argument.
-
setColumn(int, float, float, float)
- Sets the specified column of this matrix3f to the three values provided.
-
setColumn(int, float[])
- Sets the specified column of this matrix3f to the three values provided.
-
setColumn(int, Vector3f)
- Sets the specified column of this matrix3f to the vector provided.
-
setElement(int, int, float)
- Sets the specified element of this matrix3f to the value provided.
-
setIdentity()
- Sets this Matrix3f to identity.
-
setRow(int, float, float, float)
- Sets the specified row of this matrix3f to the three values provided.
-
setRow(int, float[])
- Sets the specified row of this matrix3f to the three values provided.
-
setRow(int, Vector3f)
- Sets the specified row of this matrix3f to the Vector provided.
-
setZero()
- Sets this matrix to all zeros.
-
sub(Matrix3f)
-
Sets the value of this matrix to the matrix difference
of itself and matrix m1 (this = this - m1).
-
sub(Matrix3f, Matrix3f)
- Sets the value of this matrix to the matrix difference
of matrices m1 and m2.
-
toString()
- Returns a string that contains the values of this Matrix3f.
-
transpose()
- Sets the value of this matrix to its transpose.
-
transpose(Matrix3f)
- Sets the value of this matrix to the transpose of the argument matrix.
m00
public float m00
- The matrix element that maps x into x'.
m01
public float m01
- The matrix element that maps y into x'.
m02
public float m02
- The matrix element that maps z into x'.
m10
public float m10
- The matrix element that maps x into y'.
m11
public float m11
- The matrix element that maps y into y'.
m12
public float m12
- The matrix element that maps z into y'.
m20
public float m20
- The matrix element that maps x into z'.
m21
public float m21
- The matrix element that maps y into z'.
m22
public float m22
- The matrix element that maps z into z'.
Matrix3f
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 - the [0][0] element
- m01 - the [0][1] element
- m02 - the [0][2] element
- m10 - the [1][0] element
- m11 - the [1][1] element
- m12 - the [1][2] element
- m20 - the [2][0] element
- m21 - the [2][1] element
- m22 - the [2][2] element
Matrix3f
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 - the array of length 9 containing in order
Matrix3f
public Matrix3f(Matrix3d m1)
- Constructs a new matrix with the same values as the
Matrix3d parameter.
- Parameters:
- m1 - The source matrix.
Matrix3f
public Matrix3f(Matrix3f m1)
- Constructs a new matrix with the same values as the
Matrix3f parameter.
- Parameters:
- m1 - The source matrix.
Matrix3f
public Matrix3f()
- Constructs and initializes a Matrix3f to all zeros.
toString
public String toString()
- Returns a string that contains the values of this Matrix3f.
- Returns:
- the String representation
- Overrides:
- toString in class Object
setIdentity
public final void setIdentity()
- Sets this Matrix3f to identity.
setElement
public final void setElement(int row,
int column,
float value)
- Sets the specified element of this matrix3f to the value provided.
- Parameters:
- row - the row number to be modified (zero indexed)
- column - the column number to be modified (zero indexed)
- value - the new value
getElement
public final float getElement(int row,
int column)
- Retrieves the value at the specified row and column of this
matrix.
- Parameters:
- row - the row number to be retrieved (zero indexed)
- column - the column number to be retrieved (zero indexed)
- m - the matrix
- Returns:
- the value at the indexed element.
setRow
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 - the row number to be modified (zero indexed)
- x - the first column element
- y - the second column element
- z - the third column element
setRow
public final void setRow(int row,
Vector3f v)
- Sets the specified row of this matrix3f to the Vector provided.
- Parameters:
- row - the row number to be modified (zero indexed)
- v - the replacement row
setRow
public final void setRow(int row,
float v[])
- Sets the specified row of this matrix3f to the three values provided.
- Parameters:
- row - the row number to be modified (zero indexed)
- v - the replacement row
setColumn
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 - the column number to be modified (zero indexed)
- x - the first row element
- y - the second row element
- z - the third row element
setColumn
public final void setColumn(int column,
Vector3f v)
- Sets the specified column of this matrix3f to the vector provided.
- Parameters:
- column - the column number to be modified (zero indexed)
- v - the replacement column
setColumn
public final void setColumn(int column,
float v[])
- Sets the specified column of this matrix3f to the three values provided.
- Parameters:
- column - the column number to be modified (zero indexed)
- v - the replacement column
add
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 - the first matrix
- m2 - the second matrix
add
public final void add(Matrix3f m1)
- Sets the value of this matrix to the matrix sum of itself and
matrix m1.
- Parameters:
- m1 - the other matrix
sub
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 - the first matrix
- m2 - the second matrix
sub
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 - the other matrix
transpose
public final void transpose()
- Sets the value of this matrix to its transpose.
transpose
public final void transpose(Matrix3f m1)
- Sets the value of this matrix to the transpose of the argument matrix.
- Parameters:
- m1 - the matrix to be transposed
set
public final void set(Quat4f q1)
- Sets the value of this matrix to the matrix conversion of the
(single precision) quaternion argument.
- Parameters:
- q1 - the quaternion to be converted
set
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 - the axis and angle to be converted
set
public final void set(AxisAngle4d a1)
set
public final void set(Quat4d q1)
- Sets the value of this matrix to the matrix conversion of the
(single precision) quaternion argument.
- Parameters:
- q1 - the quaternion to be converted
set
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 - The single precision array of length 9
invert
public final void invert(Matrix3f m1)
- Sets the value of this matrix to the matrix inverse
of the passed matrix m1.
- Parameters:
- m1 - the matrix to be inverted
invert
public final void invert()
- Inverts this matrix in place.
determinant
public final float determinant()
- Computes the determinant of this matrix.
- Returns:
- the determinant of this matrix
set
public final void set(float scale)
- Sets the value of this matrix to a scale matrix with
the passed scale amount.
- Parameters:
- scale - the scale factor for the matrix
rotX
public final void rotX(float angle)
- Sets the value of this matrix to a rotation matrix about the x axis
by the passed angle.
- Parameters:
- angle - the angle to rotate about the X axis in radians
rotY
public final void rotY(float angle)
- Sets the value of this matrix to a rotation matrix about the y axis
by the passed angle.
- Parameters:
- angle - the angle to rotate about the Y axis in radians
rotZ
public final void rotZ(float angle)
- Sets the value of this matrix to a rotation matrix about the z axis
by the passed angle.
- Parameters:
- angle - the angle to rotate about the Z axis in radians
mul
public final void mul(Matrix3f m1)
- Sets the value of this matrix to the result of multiplying itself
with matrix m1.
- Parameters:
- m1 - the other matrix
mul
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 - the first matrix
- m2 - the second matrix
mulNormalize
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:
- The - matrix on the right hand side of the multiplication
mulNormalize
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 - The matrix on the left hand side of the multiplication
- m2 - The matrix on the right hand side of the multiplication
mulTransposeBoth
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 - The matrix on the left hand side of the multiplication
- m2 - The matrix on the right hand side of the multiplication
mulTransposeRight
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 - The matrix on the left hand side of the multiplication
- m2 - The matrix on the right hand side of the multiplication
mulTransposeLeft
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 - The matrix on the left hand side of the multiplication
- m2 - The matrix on the right hand side of the multiplication
normalize
public final void normalize()
- Performs singular value decomposition normalization of this matrix.
normalize
public final void normalize(Matrix3f m1)
- Perform singular value decomposition normalization of matrix m1
and place the normalized values into this.
- Parameters:
- m1 - Provides the matrix values to be normalized
normalizeCP
public final void normalizeCP()
- Perform cross product normalization of this matrix.
normalizeCP
public final void normalizeCP(Matrix3f m1)
- Perform cross product normalization of matrix m1 and place the
normalized values into this.
- Parameters:
- m1 - Provides the matrix values to be normalized
equals
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 - The matrix with which the comparison is made.
- Returns:
- true or false
epsilonEquals
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 - The matrix to be compared to this matrix
- epsilon - the threshold value
hashCode
public int hashCode()
- Returns a hash number based on the data values in this
object. Two different Matrix3f objects with identical data values
(ie, returns true for equals(Matrix3f) ) will return the same hash
number. Two objects with different data members may return the
same hash value, although this is not likely.
- Returns:
- the integer hash value
- Overrides:
- hashCode in class Object
setZero
public final void setZero()
- Sets this matrix to all zeros.
negate
public final void negate()
- Negates the value of this matrix: this = -this.
negate
public final void negate(Matrix3f m1)
- Sets the value of this matrix equal to the negation of
of the Matrix3f parameter.
- Parameters:
- m1 - The source matrix
All Packages Class Hierarchy This Package Previous Next Index