@ -41,10 +41,10 @@ import java.util.logging.Logger;
/ * *
* < code > Matrix4f < / code > defines and maintains a 4x4 matrix in row major order .
* This matrix is intended for use in a translation and rotational capacity .
* It provides convenience methods for creating the matrix from a multitude
* This matrix is intended for use in a translation and rotational capacity .
* It provides convenience methods for creating the matrix from a multitude
* of sources .
*
*
* Matrices are stored assuming column vectors on the right , with the translation
* in the rightmost column . Element numbering is row , column , so m03 is the zeroth
* row , third column , which is the "x" translation part . This means that the implicit
@ -69,7 +69,6 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Constructor instantiates a new < code > Matrix < / code > that is set to the
* identity matrix .
*
* /
public Matrix4f ( ) {
loadIdentity ( ) ;
@ -77,6 +76,23 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* constructs a matrix with the given values .
*
* @param m00 the desired value for row 0 , column 0
* @param m01 the desired value for row 0 , column 1
* @param m02 the desired value for row 0 , column 2
* @param m03 the desired value for row 0 , column 3
* @param m10 the desired value for row 1 , column 0
* @param m11 the desired value for row 1 , column 1
* @param m12 the desired value for row 1 , column 2
* @param m13 the desired value for row 1 , column 3
* @param m20 the desired value for row 2 , column 0
* @param m21 the desired value for row 2 , column 1
* @param m22 the desired value for row 2 , column 2
* @param m23 the desired value for row 2 , column 3
* @param m30 the desired value for row 3 , column 0
* @param m31 the desired value for row 3 , column 1
* @param m32 the desired value for row 3 , column 2
* @param m33 the desired value for row 3 , column 3
* /
public Matrix4f ( float m00 , float m01 , float m02 , float m03 ,
float m10 , float m11 , float m12 , float m13 ,
@ -105,7 +121,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* Create a new Matrix4f , given data in column - major format .
*
* @param array
* An array of 16 floats in column - major format ( translation in elements 12 , 13 and 14 ) .
* An array of 16 floats in column - major format ( translation in elements 12 , 13 and 14 ) .
* /
public Matrix4f ( float [ ] array ) {
set ( array , false ) ;
@ -115,7 +131,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* Constructor instantiates a new < code > Matrix < / code > that is set to the
* provided matrix . This constructor copies a given Matrix . If the provided
* matrix is null , the constructor sets the matrix to the identity .
*
*
* @param mat
* the matrix to copy .
* /
@ -127,7 +143,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* < code > copy < / code > transfers the contents of a given matrix to this
* matrix . If a null matrix is supplied , this matrix is set to the identity
* matrix .
*
*
* @param matrix
* the matrix to copy .
* /
@ -188,7 +204,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > get < / code > retrieves the values of this object into
* a float array in row - major order .
*
*
* @param matrix
* the matrix to set the values into .
* /
@ -199,7 +215,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > set < / code > retrieves the values of this object into
* a float array .
*
*
* @param matrix
* the matrix to set the values into .
* @param rowMajor
@ -250,14 +266,13 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > get < / code > retrieves a value from the matrix at the given
* position . If the position is invalid a < code > JmeException < / code > is
* thrown .
*
* @param i
* the row index .
* @param j
* the colum index .
* position .
*
* @param i the row index .
* @param j the column index .
* @return the value at ( i , j ) .
* @throws IllegalArgumentException
* if either index is invalid
* /
@SuppressWarnings ( "fallthrough" )
public float get ( int i , int j ) {
@ -315,9 +330,8 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > getColumn < / code > returns one of three columns specified by the
* parameter . This column is returned as a float array of length 4 .
*
* @param i
* the column to retrieve . Must be between 0 and 3 .
*
* @param i the column to retrieve . Must be between 0 and 3 .
* @return the column specified by the index .
* /
public float [ ] getColumn ( int i ) {
@ -327,9 +341,8 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > getColumn < / code > returns one of three columns specified by the
* parameter . This column is returned as a float [ 4 ] .
*
* @param i
* the column to retrieve . Must be between 0 and 3 .
*
* @param i the column to retrieve . Must be between 0 and 3 .
* @param store
* the float array to store the result in . if null , a new one
* is created .
@ -372,12 +385,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > setColumn < / code > sets a particular column of this matrix to that
* represented by the provided vector .
*
* @param i
* the column to set .
*
* @param i the column to set .
* @param column
* the data to set .
* /
@ -420,15 +431,14 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > set < / code > places a given value into the matrix at the given
* position . If the position is invalid a < code > JmeException < / code > is
* thrown .
*
* @param i
* the row index .
* @param j
* the colum index .
* position .
*
* @param i the row index .
* @param j the column index .
* @param value
* the value for ( i , j ) .
* @throws IllegalArgumentException
* if either index is invalid
* /
@SuppressWarnings ( "fallthrough" )
public void set ( int i , int j , float value ) {
@ -502,11 +512,11 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > set < / code > sets the values of this matrix from an array of
* values .
*
*
* @param matrix
* the matrix to set the value to .
* @throws Jme Exception
* if the array is not of size 16 .
* @throws IllegalArgument Exception
* if the array isn ' t 4x4
* /
public void set ( float [ ] [ ] matrix ) {
if ( matrix . length ! = 4 | | matrix [ 0 ] . length ! = 4 ) {
@ -531,10 +541,26 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
m32 = matrix [ 3 ] [ 2 ] ;
m33 = matrix [ 3 ] [ 3 ] ;
}
/ * *
* Sets the values of this matrix
*
* @param m00 the desired value for row 0 , column 0
* @param m01 the desired value for row 0 , column 1
* @param m02 the desired value for row 0 , column 2
* @param m03 the desired value for row 0 , column 3
* @param m10 the desired value for row 1 , column 0
* @param m11 the desired value for row 1 , column 1
* @param m12 the desired value for row 1 , column 2
* @param m13 the desired value for row 1 , column 3
* @param m20 the desired value for row 2 , column 0
* @param m21 the desired value for row 2 , column 1
* @param m22 the desired value for row 2 , column 2
* @param m23 the desired value for row 2 , column 3
* @param m30 the desired value for row 3 , column 0
* @param m31 the desired value for row 3 , column 1
* @param m32 the desired value for row 3 , column 2
* @param m33 the desired value for row 3 , column 3
* /
public void set ( float m00 , float m01 , float m02 , float m03 ,
float m10 , float m11 , float m12 , float m13 ,
@ -564,6 +590,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
*
* @param matrix
* the matrix to read the value from .
* @return this
* /
public Matrix4f set ( Matrix4f matrix ) {
m00 = matrix . m00 ;
@ -588,7 +615,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > set < / code > sets the values of this matrix from an array of
* values assuming that the data is rowMajor order ;
*
*
* @param matrix
* the matrix to set the value to .
* /
@ -599,7 +626,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > set < / code > sets the values of this matrix from an array of
* values ;
*
*
* @param matrix
* the matrix to set the value to .
* @param rowMajor
@ -657,7 +684,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > transpose < / code > locally transposes this Matrix .
*
*
* @return this object for chaining .
* /
public Matrix4f transposeLocal ( ) {
@ -691,7 +718,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > toFloatBuffer < / code > returns a FloatBuffer object that contains
* the matrix data .
*
*
* @return matrix data as a FloatBuffer .
* /
public FloatBuffer toFloatBuffer ( ) {
@ -701,7 +728,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > toFloatBuffer < / code > returns a FloatBuffer object that contains the
* matrix data .
*
*
* @param columnMajor
* if true , this buffer should be filled with column major data ,
* otherwise it will be filled row major .
@ -718,6 +745,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > fillFloatBuffer < / code > fills a FloatBuffer object with
* the matrix data .
*
* @param fb the buffer to fill , must be correct size
* @return matrix data as a FloatBuffer .
* /
@ -728,7 +756,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > fillFloatBuffer < / code > fills a FloatBuffer object with the matrix
* data .
*
*
* @param fb
* the buffer to fill , starting at current position . Must have
* room for 16 more floats .
@ -753,7 +781,6 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
TempVars vars = TempVars . get ( ) ;
fillFloatArray ( vars . matrixWrite , columnMajor ) ;
fb . put ( vars . matrixWrite , 0 , 16 ) ;
@ -764,16 +791,16 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
public void fillFloatArray ( float [ ] f , boolean columnMajor ) {
if ( columnMajor ) {
f [ 0 ] = m00 ;
f [ 1 ] = m10 ;
f [ 2 ] = m20 ;
f [ 3 ] = m30 ;
f [ 4 ] = m01 ;
f [ 5 ] = m11 ;
f [ 6 ] = m21 ;
f [ 7 ] = m31 ;
f [ 8 ] = m02 ;
f [ 9 ] = m12 ;
f [ 0 ] = m00 ;
f [ 1 ] = m10 ;
f [ 2 ] = m20 ;
f [ 3 ] = m30 ;
f [ 4 ] = m01 ;
f [ 5 ] = m11 ;
f [ 6 ] = m21 ;
f [ 7 ] = m31 ;
f [ 8 ] = m02 ;
f [ 9 ] = m12 ;
f [ 10 ] = m22 ;
f [ 11 ] = m32 ;
f [ 12 ] = m03 ;
@ -781,16 +808,16 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
f [ 14 ] = m23 ;
f [ 15 ] = m33 ;
} else {
f [ 0 ] = m00 ;
f [ 1 ] = m01 ;
f [ 2 ] = m02 ;
f [ 3 ] = m03 ;
f [ 4 ] = m10 ;
f [ 5 ] = m11 ;
f [ 6 ] = m12 ;
f [ 7 ] = m13 ;
f [ 8 ] = m20 ;
f [ 9 ] = m21 ;
f [ 0 ] = m00 ;
f [ 1 ] = m01 ;
f [ 2 ] = m02 ;
f [ 3 ] = m03 ;
f [ 4 ] = m10 ;
f [ 5 ] = m11 ;
f [ 6 ] = m12 ;
f [ 7 ] = m13 ;
f [ 8 ] = m20 ;
f [ 9 ] = m21 ;
f [ 10 ] = m22 ;
f [ 11 ] = m23 ;
f [ 12 ] = m30 ;
@ -802,6 +829,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > readFloatBuffer < / code > reads value for this matrix from a FloatBuffer .
*
* @param fb the buffer to read from , must be correct size
* @return this data as a FloatBuffer .
* /
@ -811,9 +839,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > readFloatBuffer < / code > reads value for this matrix from a FloatBuffer .
*
* @param fb the buffer to read from , must be correct size
* @param columnMajor if true , this buffer should be filled with column
* major data , otherwise it will be filled row major .
* major data , otherwise it will be filled row major .
* @return this data as a FloatBuffer .
* /
public Matrix4f readFloatBuffer ( FloatBuffer fb , boolean columnMajor ) {
@ -859,7 +888,6 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > loadIdentity < / code > sets this matrix to the identity matrix ,
* namely all zeros with ones along the diagonal .
*
* /
public void loadIdentity ( ) {
m01 = m02 = m03 = 0 . 0f ;
@ -869,7 +897,8 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
m00 = m11 = m22 = m33 = 1 . 0f ;
}
public void fromFrustum ( float near , float far , float left , float right , float top , float bottom , boolean parallel ) {
public void fromFrustum ( float near , float far , float left , float right ,
float top , float bottom , boolean parallel ) {
loadIdentity ( ) ;
if ( parallel ) {
// scale
@ -893,7 +922,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
// A
m02 = ( right + left ) / ( right - left ) ;
// B
// B
m12 = ( top + bottom ) / ( top - bottom ) ;
// C
@ -908,7 +937,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* < code > fromAngleAxis < / code > sets this matrix4f to the values specified
* by an angle and an axis of rotation . This method creates an object , so
* use fromAngleNormalAxis if your axis is already normalized .
*
*
* @param angle
* the angle to rotate ( in radians ) .
* @param axis
@ -922,7 +951,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > fromAngleNormalAxis < / code > sets this matrix4f to the values
* specified by an angle and a normalized axis of rotation .
*
*
* @param angle
* the angle to rotate ( in radians ) .
* @param axis
@ -958,7 +987,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > mult < / code > multiplies this matrix by a scalar .
*
*
* @param scalar
* the scalar to multiply this matrix by .
* /
@ -998,7 +1027,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* < code > mult < / code > multiplies this matrix with another matrix . The
* result matrix will then be returned . This matrix will be on the left hand
* side , while the parameter matrix will be on the right .
*
*
* @param in2
* the matrix to multiply this matrix by .
* @return the resultant matrix
@ -1011,7 +1040,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* < code > mult < / code > multiplies this matrix with another matrix . The
* result matrix will then be returned . This matrix will be on the left hand
* side , while the parameter matrix will be on the right .
*
*
* @param in2
* the matrix to multiply this matrix by .
* @param store
@ -1095,7 +1124,6 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
+ m32 * in2 . m23
+ m33 * in2 . m33 ;
store . m00 = m [ 0 ] ;
store . m01 = m [ 1 ] ;
store . m02 = m [ 2 ] ;
@ -1118,10 +1146,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > mult < / code > multiplies this matrix with another matrix . The
* results are stored internally and a handle to this matrix will
* results are stored internally and a handle to this matrix will
* then be returned . This matrix will be on the left hand
* side , while the parameter matrix will be on the right .
*
*
* @param in2
* the matrix to multiply this matrix by .
* @return the resultant matrix
@ -1133,7 +1161,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > mult < / code > multiplies a vector about a rotation matrix . The
* resulting vector is returned as a new Vector3f .
*
*
* @param vec
* vec to multiply against .
* @return the rotated vector .
@ -1145,7 +1173,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > mult < / code > multiplies a vector about a rotation matrix and adds
* translation . The resulting vector is returned .
*
*
* @param vec
* vec to multiply against .
* @param store
@ -1211,7 +1239,6 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
*
* @param vec
* vec to multiply against .
*
* @return the rotated vector .
* /
public Vector4f multAcross ( Vector4f vec ) {
@ -1296,11 +1323,11 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* < code > mult < / code > multiplies a vector about a rotation matrix and adds
* translation . The w value is returned as a result of
* multiplying the last column of the matrix by 1 . 0
*
*
* @param vec
* vec to multiply against .
* @param store
* a vector to store the result in .
* a vector to store the result in .
* @return the W value
* /
public float multProj ( Vector3f vec , Vector3f store ) {
@ -1314,7 +1341,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > mult < / code > multiplies a vector about a rotation matrix . The
* resulting vector is returned .
*
*
* @param vec
* vec to multiply against .
* @param store
@ -1371,9 +1398,9 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
* < code > mult < / code > multiplies an array of 4 floats against this rotation
* < code > mult < / code > multiplies an array of 4 floats against this rotation
* matrix . The results are stored directly in the array . ( vec4f x mat4f )
*
*
* @param vec4f
* float array ( size 4 ) to multiply against the matrix .
* @return the vec4f for chaining .
@ -1395,9 +1422,9 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
* < code > mult < / code > multiplies an array of 4 floats against this rotation
* < code > mult < / code > multiplies an array of 4 floats against this rotation
* matrix . The results are stored directly in the array . ( vec4f x mat4f )
*
*
* @param vec4f
* float array ( size 4 ) to multiply against the matrix .
* @return the vec4f for chaining .
@ -1420,7 +1447,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Inverts this matrix as a new Matrix4f .
*
*
* @return The new inverse matrix
* /
public Matrix4f invert ( ) {
@ -1429,7 +1456,8 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Inverts this matrix and stores it in the given store .
*
*
* @param store storage for the result ( modified if not null )
* @return The store
* /
public Matrix4f invert ( Matrix4f store ) {
@ -1480,7 +1508,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Inverts this matrix locally .
*
*
* @return this
* /
public Matrix4f invertLocal ( ) {
@ -1545,7 +1573,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Returns a new matrix representing the adjoint of this matrix .
*
*
* @return The adjoint matrix
* /
public Matrix4f adjoint ( ) {
@ -1581,7 +1609,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Places the adjoint of this matrix in store ( creates store if null . )
*
*
* @param store
* The matrix to store the result in . If null , a new matrix is created .
* @return store
@ -1626,7 +1654,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > determinant < / code > generates the determinate of this matrix .
*
*
* @return the determinate
* /
public float determinant ( ) {
@ -1648,7 +1676,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Sets all of the values in this matrix to zero .
*
*
* @return this matrix
* /
public Matrix4f zero ( ) {
@ -1682,7 +1710,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > add < / code > adds the values of a parameter matrix to this matrix .
*
*
* @param mat
* the matrix to add to this .
* /
@ -1738,18 +1766,18 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
mat . m20 = m20 ;
mat . m21 = m21 ;
mat . m22 = m22 ;
}
}
/ * *
* Retrieves the scale vector from the matrix .
*
* @return the scale vector
* /
public Vector3f toScaleVector ( ) {
Vector3f result = new Vector3f ( ) ;
this . toScaleVector ( result ) ;
return result ;
}
/ * *
* Retrieves the scale vector from the matrix .
*
* @return the scale vector
* /
public Vector3f toScaleVector ( ) {
Vector3f result = new Vector3f ( ) ;
this . toScaleVector ( result ) ;
return result ;
}
/ * *
* Retrieves the scale vector from the matrix and stores it into a given
@ -1759,16 +1787,16 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* @return the store vector
* /
public Vector3f toScaleVector ( Vector3f store ) {
float scaleX = ( float ) Math . sqrt ( m00 * m00 + m10 * m10 + m20 * m20 ) ;
float scaleY = ( float ) Math . sqrt ( m01 * m01 + m11 * m11 + m21 * m21 ) ;
float scaleZ = ( float ) Math . sqrt ( m02 * m02 + m12 * m12 + m22 * m22 ) ;
float scaleX = ( float ) Math . sqrt ( m00 * m00 + m10 * m10 + m20 * m20 ) ;
float scaleY = ( float ) Math . sqrt ( m01 * m01 + m11 * m11 + m21 * m21 ) ;
float scaleZ = ( float ) Math . sqrt ( m02 * m02 + m12 * m12 + m22 * m22 ) ;
store . set ( scaleX , scaleY , scaleZ ) ;
return store ;
}
/ * *
* Sets the scale .
*
*
* @param x
* the X scale
* @param y
@ -1805,7 +1833,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Sets the scale .
*
*
* @param scale
* the scale vector to set
* /
@ -1815,10 +1843,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setTranslation < / code > will set the matrix ' s translation values .
*
*
* @param translation
* the new values for the translation .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if translation is not size 3 .
* /
public void setTranslation ( float [ ] translation ) {
@ -1833,13 +1861,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setTranslation < / code > will set the matrix ' s translation values .
*
* @param x
* value of the translation on the x axis
* @param y
* value of the translation on the y axis
* @param z
* value of the translation on the z axis
*
* @param x value of the translation on the x axis
* @param y value of the translation on the y axis
* @param z value of the translation on the z axis
* /
public void setTranslation ( float x , float y , float z ) {
m03 = x ;
@ -1862,10 +1887,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setInverseTranslation < / code > will set the matrix ' s inverse
* translation values .
*
*
* @param translation
* the new values for the inverse translation .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if translation is not size 3 .
* /
public void setInverseTranslation ( float [ ] translation ) {
@ -1883,7 +1908,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* three axes ( x , y , z ) . Where each axis has a specified rotation in
* degrees . These rotations are expressed in a single < code > Vector3f < / code >
* object .
*
*
* @param angles
* the angles to rotate .
* /
@ -1919,7 +1944,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setRotationQuaternion < / code > builds a rotation from a
* < code > Quaternion < / code > .
*
*
* @param quat
* the quaternion to build the rotation from .
* @throws NullPointerException
@ -1932,10 +1957,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setInverseRotationRadians < / code > builds an inverted rotation from
* Euler angles that are in radians .
*
*
* @param angles
* the Euler angles in radians .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if angles is not size 3 .
* /
public void setInverseRotationRadians ( float [ ] angles ) {
@ -1969,10 +1994,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* < code > setInverseRotationDegrees < / code > builds an inverted rotation from
* Euler angles that are in degrees .
*
*
* @param angles
* the Euler angles in degrees .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if angles is not size 3 .
* /
public void setInverseRotationDegrees ( float [ ] angles ) {
@ -1988,13 +2013,12 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > inverseTranslateVect < / code > translates a given Vector3f by the
* translation part of this matrix .
*
*
* @param vec
* the Vector3f data to be translated .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if the size of the Vector3f is not 3 .
* /
public void inverseTranslateVect ( float [ ] vec ) {
@ -2009,13 +2033,12 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > inverseTranslateVect < / code > translates a given Vector3f by the
* translation part of this matrix .
*
*
* @param data
* the Vector3f to be translated .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if the size of the Vector3f is not 3 .
* /
public void inverseTranslateVect ( Vector3f data ) {
@ -2025,13 +2048,12 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > inverseTranslateVect < / code > translates a given Vector3f by the
* translation part of this matrix .
*
*
* @param data
* the Vector3f to be translated .
* @throws Jme Exception
* @throws IllegalArgument Exception
* if the size of the Vector3f is not 3 .
* /
public void translateVect ( Vector3f data ) {
@ -2041,10 +2063,9 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > inverseRotateVect < / code > rotates a given Vector3f by the rotation
* part of this matrix .
*
*
* @param vec
* the Vector3f to be rotated .
* /
@ -2072,7 +2093,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* 0 . 0 1 . 0 0 . 0 0 . 0 < br >
* 0 . 0 0 . 0 1 . 0 0 . 0 < br >
* 0 . 0 0 . 0 0 . 0 1 . 0 < br > ] < br >
*
*
* @return the string representation of this object .
* /
@Override
@ -2118,11 +2139,10 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
}
/ * *
*
* < code > hashCode < / code > returns the hash code value as an integer and is
* supported for the benefit of hashing based collection classes such as
* Hashtable , HashMap , HashSet etc .
*
*
* @return the hashcode for this instance of Matrix4f .
* @see java . lang . Object # hashCode ( )
* /
@ -2161,7 +2181,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
* /
@Override
public boolean equals ( Object o ) {
if ( ! ( o instanceof Matrix4f ) | | o = = null ) {
if ( ! ( o instanceof Matrix4f ) ) {
return false ;
}
@ -2277,7 +2297,7 @@ public final class Matrix4f implements Savable, Cloneable, java.io.Serializable
/ * *
* Apply a scale to this matrix .
*
*
* @param scale
* the scale to apply
* /