All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.vecmath.Matrix3d

java.lang.Object
   |
   +----java.vecmath.Matrix3d

public class Matrix3d
extends Object
A double precision floating point 3 by 3 matrix. Primarily to support rotations


Variable Index

 o m00
The matrix element that maps x into x'.
 o m01
The matrix element that maps y into x'.
 o m02
The matrix element that maps z into x'.
 o m10
The matrix element that maps x into y'.
 o m11
The matrix element that maps y into y'.
 o m12
The matrix element that maps z into y'.
 o m20
The matrix element that maps x into z'.
 o m21
The matrix element that maps y into z'.
 o m22
The matrix element that maps z into z'.

Constructor Index

 o Matrix3d()
Constructs and initializes a Matrix3d to all zeros.
 o Matrix3d(double, double, double, double, double, double, double, double, double)
Constructs and initializes a Matrix3d from the specified nine values.
 o Matrix3d(double[])
Constructs and initializes a Matrix3d from the specified nine- element array.
 o Matrix3d(Matrix3d)
Constructs a new matrix with the same values as the Matrix3d parameter.
 o Matrix3d(Matrix3f)
Constructs a new matrix with the same values as the Matrix3f parameter.

Method Index

 o add(Matrix3d)
Sets the value of this matrix to the sum of itself and matrix m1.
 o add(Matrix3d, Matrix3d)
Sets the value of this matrix to the matrix sum of matrices m1 and m2.
 o determinant()
Computes the determinant of this matrix.
 o epsilonEquals(Matrix3d, double)
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.
 o equals(Matrix3d)
Returns true if all of the data members of Matrix3d m1 are equal to the corresponding data members in this Matrix3d.
 o getElement(int, int)
Retrieves the value at the specified row and column of the specified matrix.
 o hashCode()
Returns a hash number based on the data values in this object.
 o invert()
Inverts this matrix in place.
 o invert(Matrix3d)
Sets the value of this matrix to the matrix inverse of the passed matrix m1.
 o mul(Matrix3d)
Sets the value of this matrix to the result of multiplying itself with matrix m1.
 o mul(Matrix3d, Matrix3d)
Sets the value of this matrix to the result of multiplying the two argument matrices together.
 o mulNormalize(Matrix3d)
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).
 o mulNormalize(Matrix3d, Matrix3d)
Multiplies matrix m1 by matrix m2, does an SVD normalization of the result, and places the result into this matrix this = SVDnorm(m1*m2).
 o mulTransposeBoth(Matrix3d, Matrix3d)
Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.
 o mulTransposeLeft(Matrix3d, Matrix3d)
Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.
 o mulTransposeRight(Matrix3d, Matrix3d)
Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.
 o negate()
Negates the value of this matrix: this = -this.
 o negate(Matrix3d)
Sets the value of this matrix equal to the negation of of the Matrix3d parameter.
 o normalize()
Performs singular value decomposition normalization of this matrix.
 o normalize(Matrix3d)
Perform singular value decomposition normalization of matrix m1 and place the normalized values into this.
 o normalizeCP()
Perform cross product normalization of this matrix.
 o normalizeCP(Matrix3d)
Perform cross product normalization of matrix m1 and place the normalized values into this.
 o rotX(double)
Sets the value of this matrix to a rotation matrix about the x axis by the passed angle.
 o rotY(double)
Sets the value of this matrix to a rotation matrix about the y axis by the passed angle.
 o rotZ(double)
Sets the value of this matrix to a rotation matrix about the z axis by the passed angle.
 o set(AxisAngle4d)
Sets the value of this matrix to the matrix conversion of the double precision axis and angle argument.
 o set(AxisAngle4f)
Sets the value of this matrix to the matrix conversion of the single precision axis and angle argument.
 o set(double)
Sets the value of this matrix to a scale matrix with the passed scale amount.
 o set(double[])
Sets the values in this Matrix3d 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.).
 o set(Matrix3f)
Sets the value of this matrix to the double value of the Matrix3f argument.
 o set(Quat4d)
Sets the value of this matrix to the matrix conversion of the double precision quaternion argument.
 o set(Quat4f)
Sets the value of this matrix to the matrix conversion of the single precision quaternion argument.
 o setColumn(int, double, double, double)
Sets the specified column of this matrix3d to the three values provided.
 o setColumn(int, double[])
Sets the specified column of this matrix3d to the three values provided.
 o setColumn(int, Vector3d)
Sets the specified column of this matrix3d to the vector provided.
 o setElement(int, int, double)
Sets the specified element of this matrix3f to the value provided.
 o setIdentity()
Sets this Matrix3d to identity.
 o setRow(int, double, double, double)
Sets the specified row of this matrix3d to the 4 values provided.
 o setRow(int, double[])
Sets the specified row of this matrix3d to the three values provided.
 o setRow(int, Vector3d)
Sets the specified row of this matrix3d to the Vector provided.
 o setZero()
Sets this matrix to all zeros.
 o sub(Matrix3d)
Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).
 o sub(Matrix3d, Matrix3d)
Sets the value of this matrix to the matrix difference of matrices m1 and m2.
 o toString()
Returns a string that contains the values of this Matrix3d.
 o transpose()
Sets the value of this matrix to its transpose.
 o transpose(Matrix3d)
Sets the value of this matrix to the transpose of the argument matrix.

Variables

 o m00
 public double m00
The matrix element that maps x into x'.

 o m01
 public double m01
The matrix element that maps y into x'.

 o m02
 public double m02
The matrix element that maps z into x'.

 o m10
 public double m10
The matrix element that maps x into y'.

 o m11
 public double m11
The matrix element that maps y into y'.

 o m12
 public double m12
The matrix element that maps z into y'.

 o m20
 public double m20
The matrix element that maps x into z'.

 o m21
 public double m21
The matrix element that maps y into z'.

 o m22
 public double m22
The matrix element that maps z into z'.

Constructors

 o Matrix3d
 public Matrix3d(double m00,
                 double m01,
                 double m02,
                 double m10,
                 double m11,
                 double m12,
                 double m20,
                 double m21,
                 double m22)
Constructs and initializes a Matrix3d 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
Returns:
a new Matrix3d
 o Matrix3d
 public Matrix3d(double v[])
Constructs and initializes a Matrix3d from the specified nine- element array.

Parameters:
v - the array of length 9 containing in order
 o Matrix3d
 public Matrix3d(Matrix3d m1)
Constructs a new matrix with the same values as the Matrix3d parameter.

Parameters:
m1 - The source matrix.
 o Matrix3d
 public Matrix3d(Matrix3f m1)
Constructs a new matrix with the same values as the Matrix3f parameter.

Parameters:
m1 - The source matrix.
 o Matrix3d
 public Matrix3d()
Constructs and initializes a Matrix3d to all zeros.

Methods

 o toString
 public String toString()
Returns a string that contains the values of this Matrix3d.

Returns:
the String representation
Overrides:
toString in class Object
 o setIdentity
 public final void setIdentity()
Sets this Matrix3d to identity.

 o setElement
 public final void setElement(int row,
                              int column,
                              double 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
 o getElement
 public final double getElement(int row,
                                int column)
Retrieves the value at the specified row and column of the specified 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.
 o setRow
 public final void setRow(int row,
                          double x,
                          double y,
                          double z)
Sets the specified row of this matrix3d to the 4 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
 o setRow
 public final void setRow(int row,
                          Vector3d v)
Sets the specified row of this matrix3d to the Vector provided.

Parameters:
row - the row number to be modified (zero indexed)
v - the replacement row
 o setRow
 public final void setRow(int row,
                          double v[])
Sets the specified row of this matrix3d to the three values provided.

Parameters:
row - the row number to be modified (zero indexed)
v - the replacement row
 o setColumn
 public final void setColumn(int column,
                             double x,
                             double y,
                             double z)
Sets the specified column of this matrix3d 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
 o setColumn
 public final void setColumn(int column,
                             Vector3d v)
Sets the specified column of this matrix3d to the vector provided.

Parameters:
column - the column number to be modified (zero indexed)
v - the replacement column
 o setColumn
 public final void setColumn(int column,
                             double v[])
Sets the specified column of this matrix3d to the three values provided.

Parameters:
column - the column number to be modified (zero indexed)
v - the replacement column
 o add
 public final void add(Matrix3d m1,
                       Matrix3d 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
 o add
 public final void add(Matrix3d m1)
Sets the value of this matrix to the sum of itself and matrix m1.

Parameters:
m1 - the other matrix
 o sub
 public final void sub(Matrix3d m1,
                       Matrix3d 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
 o sub
 public final void sub(Matrix3d m1)
Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).

Parameters:
m1 - the other matrix
 o transpose
 public final void transpose()
Sets the value of this matrix to its transpose.

 o transpose
 public final void transpose(Matrix3d m1)
Sets the value of this matrix to the transpose of the argument matrix.

Parameters:
m1 - the matrix to be transposed
 o set
 public final void set(Quat4d q1)
Sets the value of this matrix to the matrix conversion of the double precision quaternion argument.

Parameters:
q1 - the quaternion to be converted
 o set
 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 - the axis and angle to be converted
 o 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
 o 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
 o set
 public final void set(Matrix3f m1)
Sets the value of this matrix to the double value of the Matrix3f argument.

Parameters:
m1 - the matrix3d to be converted to double
 o set
 public final void set(double m[])
Sets the values in this Matrix3d 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 double precision array of length 9
 o invert
 public final void invert(Matrix3d m1)
Sets the value of this matrix to the matrix inverse of the passed matrix m1.

Parameters:
m1 - the matrix to be inverted
 o invert
 public final void invert()
Inverts this matrix in place.

 o determinant
 public final double determinant()
Computes the determinant of this matrix.

Returns:
the determinant of the matrix
 o set
 public final void set(double scale)
Sets the value of this matrix to a scale matrix with the passed scale amount.

Parameters:
scale - the scale factor for the matrix
 o rotX
 public final void rotX(double 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
 o rotY
 public final void rotY(double 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
 o rotZ
 public final void rotZ(double 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
 o mul
 public final void mul(Matrix3d m1)
Sets the value of this matrix to the result of multiplying itself with matrix m1.

Parameters:
m1 - the other matrix
 o mul
 public final void mul(Matrix3d m1,
                       Matrix3d 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
 o mulNormalize
 public final void mulNormalize(Matrix3d 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 - the matrix on the right hand side of the multiplication
 o mulNormalize
 public final void mulNormalize(Matrix3d m1,
                                Matrix3d 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
 o mulTransposeBoth
 public final void mulTransposeBoth(Matrix3d m1,
                                    Matrix3d 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
 o mulTransposeRight
 public final void mulTransposeRight(Matrix3d m1,
                                     Matrix3d 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
 o mulTransposeLeft
 public final void mulTransposeLeft(Matrix3d m1,
                                    Matrix3d 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
 o normalize
 public final void normalize()
Performs singular value decomposition normalization of this matrix.

 o normalize
 public final void normalize(Matrix3d 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
 o normalizeCP
 public final void normalizeCP()
Perform cross product normalization of this matrix.

 o normalizeCP
 public final void normalizeCP(Matrix3d m1)
Perform cross product normalization of matrix m1 and place the normalized values into this.

Parameters:
m1 - Provides the matrix values to be normalized
 o equals
 public boolean equals(Matrix3d m1)
Returns true if all of the data members of Matrix3d m1 are equal to the corresponding data members in this Matrix3d.

Parameters:
m1 - The matrix with which the comparison is made.
Returns:
true or false
 o epsilonEquals
 public boolean epsilonEquals(Matrix3d m1,
                              double 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
 o hashCode
 public int hashCode()
Returns a hash number based on the data values in this object. Two different Matrix3d objects with identical data values (ie, returns true for equals(Matrix3d) ) 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
 o setZero
 public final void setZero()
Sets this matrix to all zeros.

 o negate
 public final void negate()
Negates the value of this matrix: this = -this.

 o negate
 public final void negate(Matrix3d m1)
Sets the value of this matrix equal to the negation of of the Matrix3d parameter.

Parameters:
m1 - The source matrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index