Matrix3d

Contains the definition of a 3x3 matrix of doubles, and associated functions to transform it. The matrix is column-major to match OpenGL's interpretation, and it looks like this: <p> m00 m10 m20<br> m01 m11 m21<br> m02 m12 m22<br>

@author Richard Greenlees @author Kai Burjack

struct Matrix3d {}

Constructors

this
this(Matrix2d mat)

Create a new {@link Matrix3d} by setting its uppper left 2x2 submatrix to the values of the given {@link Matrix2d} and the rest to identity.

this
this(Matrix3d mat)

Create a new {@link Matrix3d} and initialize it with the values from the given matrix.

this
this(Matrix4d mat)

Create a new {@link Matrix3d} and make it a copy of the upper left 3x3 of the given {@link Matrix4d}.

this
this(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)

Create a new {@link Matrix3d} and initialize its elements with the given values.

this
this(Vector3d col0, Vector3d col1, Vector3d col2)

Create a new {@link Matrix3d} and initialize its three columns using the supplied vectors.

Members

Functions

_m00
Matrix3d _m00(double m00)

Set the value of the matrix element at column 0 and row 0.

_m01
Matrix3d _m01(double m01)

Set the value of the matrix element at column 0 and row 1.

_m02
Matrix3d _m02(double m02)

Set the value of the matrix element at column 0 and row 2.

_m10
Matrix3d _m10(double m10)

Set the value of the matrix element at column 1 and row 0.

_m11
Matrix3d _m11(double m11)

Set the value of the matrix element at column 1 and row 1.

_m12
Matrix3d _m12(double m12)

Set the value of the matrix element at column 1 and row 2.

_m20
Matrix3d _m20(double m20)

Set the value of the matrix element at column 2 and row 0.

_m21
Matrix3d _m21(double m21)

Set the value of the matrix element at column 2 and row 1.

_m22
Matrix3d _m22(double m22)

Set the value of the matrix element at column 2 and row 2.

add
Matrix3d add(Matrix3d other)

Component-wise add <code>this</code> and <code>other</code>.

add
Matrix3d add(Matrix3d other, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
cofactor
Matrix3d cofactor(Matrix3d dest)

Compute the cofactor matrix of <code>this</code> and store it into <code>dest</code>. <p> The cofactor matrix can be used instead of {@link #normal(Matrix3d)} to transform normals when the orientation of the normals with respect to the surface should be preserved.

cofactor
Matrix3d cofactor()

Compute the cofactor matrix of <code>this</code>. <p> The cofactor matrix can be used instead of {@link #normal()} to transform normals when the orientation of the normals with respect to the surface should be preserved.

determinant
double determinant()
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(Matrix3d m, double delta)
Undocumented in source. Be warned that the author may not have intended to support it.
get
double get(int column, int row)
Undocumented in source. Be warned that the author may not have intended to support it.
get
Matrix3d get(Matrix3d dest)

Get the current values of <code>this</code> matrix and store them into <code>dest</code>. <p> This is the reverse method of {@link #set(Matrix3d)} and allows to obtain intermediate calculation results when chaining multiple transformations.

get
double[] get(double[] arr, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
get
double[] get(double[] arr)
Undocumented in source. Be warned that the author may not have intended to support it.
getColumn
Vector3d getColumn(int column, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getEulerAnglesXYZ
Vector3d getEulerAnglesXYZ(Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getEulerAnglesZYX
Vector3d getEulerAnglesZYX(Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getNormalizedRotation
Quaterniond getNormalizedRotation(Quaterniond dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getRow
Vector3d getRow(int row, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getRowColumn
double getRowColumn(int row, int column)
Undocumented in source. Be warned that the author may not have intended to support it.
getScale
Vector3d getScale(Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
getUnnormalizedRotation
Quaterniond getUnnormalizedRotation(Quaterniond dest)
Undocumented in source. Be warned that the author may not have intended to support it.
hashCode
int hashCode()
Undocumented in source. Be warned that the author may not have intended to support it.
identity
Matrix3d identity()

Set this matrix to the identity.

invert
Matrix3d invert()

Invert this matrix.

invert
Matrix3d invert(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
isFinite
bool isFinite()
Undocumented in source. Be warned that the author may not have intended to support it.
lerp
Matrix3d lerp(Matrix3d other, double t)

Linearly interpolate <code>this</code> and <code>other</code> using the given interpolation factor <code>t</code> and store the result in <code>this</code>. <p> If <code>t</code> is <code>0.0</code> then the result is <code>this</code>. If the interpolation factor is <code>1.0</code> then the result is <code>other</code>.

lerp
Matrix3d lerp(Matrix3d other, double t, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
lookAlong
Matrix3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)

Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookalong rotation matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookalong rotation transformation will be applied first! <p> In order to set the matrix to a lookalong transformation without post-multiplying it, use {@link #setLookAlong(double, double, double, double, double, double) setLookAlong()}

lookAlong
Matrix3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)

Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookalong rotation matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookalong rotation transformation will be applied first! <p> In order to set the matrix to a lookalong transformation without post-multiplying it, use {@link #setLookAlong(double, double, double, double, double, double) setLookAlong()}

lookAlong
Matrix3d lookAlong(Vector3d dir, Vector3d up, Matrix3d dest)

Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookalong rotation matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookalong rotation transformation will be applied first! <p> In order to set the matrix to a lookalong transformation without post-multiplying it, use {@link #setLookAlong(Vector3d, Vector3d) setLookAlong()}.

lookAlong
Matrix3d lookAlong(Vector3d dir, Vector3d up)

Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookalong rotation matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookalong rotation transformation will be applied first! <p> In order to set the matrix to a lookalong transformation without post-multiplying it, use {@link #setLookAlong(Vector3d, Vector3d) setLookAlong()}.

mapXZY
Matrix3d mapXZY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapXZnY
Matrix3d mapXZnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapXZny
Matrix3d mapXZny()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 0 -1 0 1 0 </pre>

mapXZy
Matrix3d mapXZy()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 0 1 0 1 0 </pre>

mapXnYnZ
Matrix3d mapXnYnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapXnYnz
Matrix3d mapXnYnz()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 -1 0 0 0 -1 </pre>

mapXnZY
Matrix3d mapXnZY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapXnZnY
Matrix3d mapXnZnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapXnZny
Matrix3d mapXnZny()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 0 -1 0 -1 0 </pre>

mapXnZy
Matrix3d mapXnZy()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 0 1 0 -1 0 </pre>

mapYXZ
Matrix3d mapYXZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYXnZ
Matrix3d mapYXnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYXnz
Matrix3d mapYXnz()

Multiply <code>this</code> by the matrix <pre> 0 1 0 1 0 0 0 0 -1 </pre>

mapYXz
Matrix3d mapYXz()

Multiply <code>this</code> by the matrix <pre> 0 1 0 1 0 0 0 0 1 </pre>

mapYZX
Matrix3d mapYZX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYZnX
Matrix3d mapYZnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYZnx
Matrix3d mapYZnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 1 0 0 0 1 0 </pre>

mapYZx
Matrix3d mapYZx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 1 0 0 0 1 0 </pre>

mapYnXZ
Matrix3d mapYnXZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYnXnZ
Matrix3d mapYnXnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYnXnz
Matrix3d mapYnXnz()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 1 0 0 0 0 -1 </pre>

mapYnXz
Matrix3d mapYnXz()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 1 0 0 0 0 1 </pre>

mapYnZX
Matrix3d mapYnZX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYnZnX
Matrix3d mapYnZnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapYnZnx
Matrix3d mapYnZnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 1 0 0 0 -1 0 </pre>

mapYnZx
Matrix3d mapYnZx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 1 0 0 0 -1 0 </pre>

mapZXY
Matrix3d mapZXY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZXnY
Matrix3d mapZXnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZXny
Matrix3d mapZXny()

Multiply <code>this</code> by the matrix <pre> 0 1 0 0 0 -1 1 0 0 </pre>

mapZXy
Matrix3d mapZXy()

Multiply <code>this</code> by the matrix <pre> 0 1 0 0 0 1 1 0 0 </pre>

mapZYX
Matrix3d mapZYX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZYnX
Matrix3d mapZYnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZYnx
Matrix3d mapZYnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 0 1 0 1 0 0 </pre>

mapZYx
Matrix3d mapZYx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 0 1 0 1 0 0 </pre>

mapZnXY
Matrix3d mapZnXY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZnXnY
Matrix3d mapZnXnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZnXny
Matrix3d mapZnXny()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 0 0 -1 1 0 0 </pre>

mapZnXy
Matrix3d mapZnXy()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 0 0 1 1 0 0 </pre>

mapZnYX
Matrix3d mapZnYX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZnYnX
Matrix3d mapZnYnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapZnYnx
Matrix3d mapZnYnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 0 -1 0 1 0 0 </pre>

mapZnYx
Matrix3d mapZnYx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 0 -1 0 1 0 0 </pre>

mapnXYnZ
Matrix3d mapnXYnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXYnz
Matrix3d mapnXYnz()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 1 0 0 0 -1 </pre>

mapnXZY
Matrix3d mapnXZY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXZnY
Matrix3d mapnXZnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXZny
Matrix3d mapnXZny()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 0 -1 0 1 0 </pre>

mapnXZy
Matrix3d mapnXZy()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 0 1 0 1 0 </pre>

mapnXnYZ
Matrix3d mapnXnYZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXnYnZ
Matrix3d mapnXnYnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXnYnz
Matrix3d mapnXnYnz()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 -1 0 0 0 -1 </pre>

mapnXnYz
Matrix3d mapnXnYz()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 -1 0 0 0 1 </pre>

mapnXnZY
Matrix3d mapnXnZY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXnZnY
Matrix3d mapnXnZnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnXnZny
Matrix3d mapnXnZny()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 0 -1 0 -1 0 </pre>

mapnXnZy
Matrix3d mapnXnZy()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 0 1 0 -1 0 </pre>

mapnYXZ
Matrix3d mapnYXZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYXnZ
Matrix3d mapnYXnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYXnz
Matrix3d mapnYXnz()

Multiply <code>this</code> by the matrix <pre> 0 1 0 -1 0 0 0 0 -1 </pre>

mapnYXz
Matrix3d mapnYXz()

Multiply <code>this</code> by the matrix <pre> 0 1 0 -1 0 0 0 0 1 </pre>

mapnYZX
Matrix3d mapnYZX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYZnX
Matrix3d mapnYZnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYZnx
Matrix3d mapnYZnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 -1 0 0 0 1 0 </pre>

mapnYZx
Matrix3d mapnYZx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 -1 0 0 0 1 0 </pre>

mapnYnXZ
Matrix3d mapnYnXZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYnXnZ
Matrix3d mapnYnXnZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYnXnz
Matrix3d mapnYnXnz()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 -1 0 0 0 0 -1 </pre>

mapnYnXz
Matrix3d mapnYnXz()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 -1 0 0 0 0 1 </pre>

mapnYnZX
Matrix3d mapnYnZX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYnZnX
Matrix3d mapnYnZnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnYnZnx
Matrix3d mapnYnZnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 -1 0 0 0 -1 0 </pre>

mapnYnZx
Matrix3d mapnYnZx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 -1 0 0 0 -1 0 </pre>

mapnZXY
Matrix3d mapnZXY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZXnY
Matrix3d mapnZXnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZXny
Matrix3d mapnZXny()

Multiply <code>this</code> by the matrix <pre> 0 1 0 0 0 -1 -1 0 0 </pre>

mapnZXy
Matrix3d mapnZXy()

Multiply <code>this</code> by the matrix <pre> 0 1 0 0 0 1 -1 0 0 </pre>

mapnZYX
Matrix3d mapnZYX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZYnX
Matrix3d mapnZYnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZYnx
Matrix3d mapnZYnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 0 1 0 -1 0 0 </pre>

mapnZYx
Matrix3d mapnZYx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 0 1 0 -1 0 0 </pre>

mapnZnXY
Matrix3d mapnZnXY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZnXnY
Matrix3d mapnZnXnY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZnXny
Matrix3d mapnZnXny()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 0 0 -1 -1 0 0 </pre>

mapnZnXy
Matrix3d mapnZnXy()

Multiply <code>this</code> by the matrix <pre> 0 -1 0 0 0 1 -1 0 0 </pre>

mapnZnYX
Matrix3d mapnZnYX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZnYnX
Matrix3d mapnZnYnX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mapnZnYnx
Matrix3d mapnZnYnx()

Multiply <code>this</code> by the matrix <pre> 0 0 -1 0 -1 0 -1 0 0 </pre>

mapnZnYx
Matrix3d mapnZnYx()

Multiply <code>this</code> by the matrix <pre> 0 0 1 0 -1 0 -1 0 0 </pre>

mul
Matrix3d mul(Matrix3d right, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mul
Matrix3d mul(Matrix3d right)

Multiply this matrix by the supplied matrix. This matrix will be the left one. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the <code>right</code> matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the transformation of the right matrix will be applied first!

mulComponentWise
Matrix3d mulComponentWise(Matrix3d other, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mulComponentWise
Matrix3d mulComponentWise(Matrix3d other)

Component-wise multiply <code>this</code> by <code>other</code>.

mulLocal
Matrix3d mulLocal(Matrix3d left, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
mulLocal
Matrix3d mulLocal(Matrix3d left)

Pre-multiply this matrix by the supplied <code>left</code> matrix and store the result in <code>this</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the <code>left</code> matrix, then the new matrix will be <code>L * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>L * M * v</code>, the transformation of <code>this</code> matrix will be applied first!

negateX
Matrix3d negateX(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
negateY
Matrix3d negateY(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
negateZ
Matrix3d negateZ(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
negatex
Matrix3d negatex()

Multiply <code>this</code> by the matrix <pre> -1 0 0 0 1 0 0 0 1 </pre>

negatey
Matrix3d negatey()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 -1 0 0 0 1 </pre>

negatez
Matrix3d negatez()

Multiply <code>this</code> by the matrix <pre> 1 0 0 0 1 0 0 0 -1 </pre>

normal
Matrix3d normal()

Set <code>this</code> matrix to its own normal matrix. <p> The normal matrix of <code>m</code> is the transpose of the inverse of <code>m</code>. <p> Please note that, if <code>this</code> is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method <i>need not</i> be invoked, since in that case <code>this</code> itself is its normal matrix. In this case, use {@link #set(Matrix3d)} to set a given Matrix3f to this matrix.

normal
Matrix3d normal(Matrix3d dest)

Compute a normal matrix from <code>this</code> matrix and store it into <code>dest</code>. <p> The normal matrix of <code>m</code> is the transpose of the inverse of <code>m</code>. <p> Please note that, if <code>this</code> is an orthogonal matrix or a matrix whose columns are orthogonal vectors, then this method <i>need not</i> be invoked, since in that case <code>this</code> itself is its normal matrix. In this case, use {@link #set(Matrix3d)} to set a given Matrix3d to this matrix.

normalizedPositiveX
Vector3d normalizedPositiveX(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
normalizedPositiveY
Vector3d normalizedPositiveY(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
normalizedPositiveZ
Vector3d normalizedPositiveZ(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
obliqueZ
Matrix3d obliqueZ(double a, double b)

Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * O * v</code>, the oblique transformation will be applied first! <p> The oblique transformation is defined as: <pre> x' = x + a*z y' = y + a*z z' = z </pre> or in matrix form: <pre> 1 0 a 0 1 b 0 0 1 </pre>

obliqueZ
Matrix3d obliqueZ(double a, double b, Matrix3d dest)

Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * O * v</code>, the oblique transformation will be applied first! <p> The oblique transformation is defined as: <pre> x' = x + a*z y' = y + a*z z' = z </pre> or in matrix form: <pre> 1 0 a 0 1 b 0 0 1 </pre>

positiveX
Vector3d positiveX(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
positiveY
Vector3d positiveY(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
positiveZ
Vector3d positiveZ(Vector3d dir)
Undocumented in source. Be warned that the author may not have intended to support it.
quadraticFormProduct
double quadraticFormProduct(double x, double y, double z)
Undocumented in source. Be warned that the author may not have intended to support it.
quadraticFormProduct
double quadraticFormProduct(Vector3d v)
Undocumented in source. Be warned that the author may not have intended to support it.
reflect
Matrix3d reflect(double nx, double ny, double nz, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
reflect
Matrix3d reflect(double nx, double ny, double nz)

Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the reflection matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the reflection will be applied first!

reflect
Matrix3d reflect(Vector3d normal)

Apply a mirror/reflection transformation to this matrix that reflects through the given plane specified via the plane normal. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the reflection matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the reflection will be applied first!

reflect
Matrix3d reflect(Quaterniond orientation)

Apply a mirror/reflection transformation to this matrix that reflects about a plane specified via the plane orientation. <p> This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is <code>(0, 0, 1)</code>. So, if the given {@link Quaterniond} is the identity (does not apply any additional rotation), the reflection plane will be <code>z=0</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the reflection matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the reflection will be applied first!

reflect
Matrix3d reflect(Quaterniond orientation, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
reflect
Matrix3d reflect(Vector3d normal, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
reflection
Matrix3d reflection(double nx, double ny, double nz)

Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.

reflection
Matrix3d reflection(Vector3d normal)

Set this matrix to a mirror/reflection transformation that reflects through the given plane specified via the plane normal.

reflection
Matrix3d reflection(Quaterniond orientation)

Set this matrix to a mirror/reflection transformation that reflects through a plane specified via the plane orientation. <p> This method can be used to build a reflection transformation based on the orientation of a mirror object in the scene. It is assumed that the default mirror plane's normal is <code>(0, 0, 1)</code>. So, if the given {@link Quaterniond} is the identity (does not apply any additional rotation), the reflection plane will be <code>z=0</code>, offset by the given <code>point</code>.

rotate
Matrix3d rotate(double angle, Vector3d axis, Matrix3d dest)

Apply a rotation transformation, rotating the given radians about the specified axis and store the result in <code>dest</code>. <p> The axis described by the <code>axis</code> vector needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>A</code> the rotation matrix obtained from the given axis and angle, then the new matrix will be <code>M * A</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * A * v</code>, the axis-angle rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(double, Vector3d)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(double angle, Vector3d axis)

Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix. <p> The axis described by the <code>axis</code> vector needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>A</code> the rotation matrix obtained from the given angle and axis, then the new matrix will be <code>M * A</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * A * v</code>, the axis-angle rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(double, Vector3d)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(AxisAngle4d axisAngle, Matrix3d dest)

Apply a rotation transformation, rotating about the given {@link AxisAngle4d} and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>A</code> the rotation matrix obtained from the given {@link AxisAngle4d}, then the new matrix will be <code>M * A</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * A * v</code>, the {@link AxisAngle4d} rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(AxisAngle4d)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(AxisAngle4d axisAngle)

Apply a rotation transformation, rotating about the given {@link AxisAngle4d}, to this matrix. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>A</code> the rotation matrix obtained from the given {@link AxisAngle4d}, then the new matrix will be <code>M * A</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * A * v</code>, the {@link AxisAngle4d} rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(AxisAngle4d)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(Quaterniond quat, Matrix3d dest)

Apply the rotation - and possibly scaling - transformation of the given {@link Quaterniond} to this matrix and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>Q</code> the rotation matrix obtained from the given quaternion, then the new matrix will be <code>M * Q</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * Q * v</code>, the quaternion rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(Quaterniond)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(Quaterniond quat)

Apply the rotation - and possibly scaling - transformation of the given {@link Quaterniond} to this matrix. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>Q</code> the rotation matrix obtained from the given quaternion, then the new matrix will be <code>M * Q</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * Q * v</code>, the quaternion rotation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying, use {@link #rotation(Quaterniond)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion">http://en.wikipedia.org</a>

rotate
Matrix3d rotate(double ang, double x, double y, double z, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotate
Matrix3d rotate(double ang, double x, double y, double z)

Apply rotation to this matrix by rotating the given amount of radians about the given axis specified as x, y and z components. <p> The axis described by the three components needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code> , the rotation will be applied first! <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocal
Matrix3d rotateLocal(Quaterniond quat)

Pre-multiply the rotation - and possibly scaling - transformation of the given {@link Quaterniond} to this matrix. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>Q</code> the rotation matrix obtained from the given quaternion, then the new matrix will be <code>Q * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>Q * M * v</code>, the quaternion rotation will be applied last! <p> In order to set the matrix to a rotation transformation without pre-multiplying, use {@link #rotation(Quaterniond)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion">http://en.wikipedia.org</a>

rotateLocal
Matrix3d rotateLocal(Quaterniond quat, Matrix3d dest)

Pre-multiply the rotation - and possibly scaling - transformation of the given {@link Quaterniond} to this matrix and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>Q</code> the rotation matrix obtained from the given quaternion, then the new matrix will be <code>Q * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>Q * M * v</code>, the quaternion rotation will be applied last! <p> In order to set the matrix to a rotation transformation without pre-multiplying, use {@link #rotation(Quaterniond)}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion">http://en.wikipedia.org</a>

rotateLocal
Matrix3d rotateLocal(double ang, double x, double y, double z)

Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified <code>(x, y, z)</code> axis. <p> The axis described by the three components needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotation(double, double, double, double) rotation()}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocal
Matrix3d rotateLocal(double ang, double x, double y, double z, Matrix3d dest)

Pre-multiply a rotation to this matrix by rotating the given amount of radians about the specified <code>(x, y, z)</code> axis and store the result in <code>dest</code>. <p> The axis described by the three components needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotation(double, double, double, double) rotation()}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalX
Matrix3d rotateLocalX(double ang)

Pre-multiply a rotation to this matrix by rotating the given amount of radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationX(double) rotationx}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalX
Matrix3d rotateLocalX(double ang, Matrix3d dest)

Pre-multiply a rotation around the X axis to this matrix by rotating the given amount of radians about the X axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationX(double) rotationx}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalY
Matrix3d rotateLocalY(double ang)

Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Y axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationY(double) rotationy}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalY
Matrix3d rotateLocalY(double ang, Matrix3d dest)

Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationY(double) rotationy}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalZ
Matrix3d rotateLocalZ(double ang)

Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationZ(double) rotationy}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateLocalZ
Matrix3d rotateLocalZ(double ang, Matrix3d dest)

Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>R * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the rotation will be applied last! <p> In order to set the matrix to a rotation matrix without pre-multiplying the rotation transformation, use {@link #rotationZ(double) rotationz}. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotateTowards
Matrix3d rotateTowards(Vector3d direction, Vector3d up, Matrix3d dest)

Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>direction</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookat transformation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying it, use {@link #rotationTowards(Vector3d, Vector3d) rotationTowards()}. <p> This method is equivalent to calling: <code>mul(new Matrix3d().lookAlong(new Vector3d(dir).negate(), up).invert(), dest)</code>

rotateTowards
Matrix3d rotateTowards(Vector3d direction, Vector3d up)

Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>direction</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookat transformation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying it, use {@link #rotationTowards(Vector3d, Vector3d) rotationTowards()}. <p> This method is equivalent to calling: <code>mul(new Matrix3d().lookAlong(new Vector3d(dir).negate(), up).invert())</code>

rotateTowards
Matrix3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)

Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>direction</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookat transformation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying it, use {@link #rotationTowards(double, double, double, double, double, double) rotationTowards()}. <p> This method is equivalent to calling: <code>mul(new Matrix3d().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert())</code>

rotateTowards
Matrix3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)

Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>dir</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookat transformation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying it, use {@link #rotationTowards(double, double, double, double, double, double) rotationTowards()}. <p> This method is equivalent to calling: <code>mul(new Matrix3d().lookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert(), dest)</code>

rotateX
Matrix3d rotateX(double ang)

Apply rotation about the X axis to this matrix by rotating the given amount of radians. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code> , the rotation will be applied first! <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotateX
Matrix3d rotateX(double ang, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateXYZ
Matrix3d rotateXYZ(double angleX, double angleY, double angleZ, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateXYZ
Matrix3d rotateXYZ(double angleX, double angleY, double angleZ)

Apply rotation of <code>angleX</code> radians about the X axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the rotation will be applied first! <p> This method is equivalent to calling: <code>rotateX(angleX).rotateY(angleY).rotateZ(angleZ)</code>

rotateY
Matrix3d rotateY(double ang)

Apply rotation about the Y axis to this matrix by rotating the given amount of radians. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code> , the rotation will be applied first! <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotateY
Matrix3d rotateY(double ang, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateYXZ
Matrix3d rotateYXZ(double angleY, double angleX, double angleZ, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateYXZ
Matrix3d rotateYXZ(double angleY, double angleX, double angleZ)

Apply rotation of <code>angleY</code> radians about the Y axis, followed by a rotation of <code>angleX</code> radians about the X axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the rotation will be applied first! <p> This method is equivalent to calling: <code>rotateY(angleY).rotateX(angleX).rotateZ(angleZ)</code>

rotateYXZ
Matrix3d rotateYXZ(Vector3d angles)

Apply rotation of <code>angles.y</code> radians about the Y axis, followed by a rotation of <code>angles.x</code> radians about the X axis and followed by a rotation of <code>angles.z</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the rotation will be applied first! <p> This method is equivalent to calling: <code>rotateY(angles.y).rotateX(angles.x).rotateZ(angles.z)</code>

rotateZ
Matrix3d rotateZ(double ang)

Apply rotation about the Z axis to this matrix by rotating the given amount of radians. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code> , the rotation will be applied first! <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotateZ
Matrix3d rotateZ(double ang, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateZYX
Matrix3d rotateZYX(double angleZ, double angleY, double angleX, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
rotateZYX
Matrix3d rotateZYX(double angleZ, double angleY, double angleX)

Apply rotation of <code>angleZ</code> radians about the Z axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleX</code> radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * R * v</code>, the rotation will be applied first! <p> This method is equivalent to calling: <code>rotateZ(angleZ).rotateY(angleY).rotateX(angleX)</code>

rotation
Matrix3d rotation(Quaterniond quat)

Set this matrix to the rotation - and possibly scaling - transformation of the given {@link Quaterniond}. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation. <p> In order to apply the rotation transformation to an existing transformation, use {@link #rotate(Quaterniond) rotate()} instead. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion">http://en.wikipedia.org</a>

rotation
Matrix3d rotation(double angle, double x, double y, double z)

Set this matrix to a rotation matrix which rotates the given radians about a given axis. <p> The axis described by the three components needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation. <p> In order to apply the rotation transformation to an existing transformation, use {@link #rotate(double, double, double, double) rotate()} instead. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>

rotation
Matrix3d rotation(AxisAngle4d axisAngle)

Set this matrix to a rotation transformation using the given {@link AxisAngle4d}. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation. <p> In order to apply the rotation transformation to an existing transformation, use {@link #rotate(AxisAngle4d) rotate()} instead. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle">http://en.wikipedia.org</a>

rotation
Matrix3d rotation(double angle, Vector3d axis)

Set this matrix to a rotation matrix which rotates the given radians about a given axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional rotation. <p> In order to post-multiply a rotation transformation directly to a matrix, use {@link #rotate(double, Vector3d) rotate()} instead.

rotationTowards
Matrix3d rotationTowards(Vector3d dir, Vector3d up)

Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>center - eye</code>. <p> In order to apply the rotation transformation to a previous existing transformation, use {@link #rotateTowards(double, double, double, double, double, double) rotateTowards}. <p> This method is equivalent to calling: <code>setLookAlong(new Vector3d(dir).negate(), up).invert()</code>

rotationTowards
Matrix3d rotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)

Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>center - eye</code>. <p> In order to apply the rotation transformation to a previous existing transformation, use {@link #rotateTowards(double, double, double, double, double, double) rotateTowards}. <p> This method is equivalent to calling: <code>setLookAlong(-dirX, -dirY, -dirZ, upX, upY, upZ).invert()</code>

rotationX
Matrix3d rotationX(double ang)

Set this matrix to a rotation transformation about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotationXYZ
Matrix3d rotationXYZ(double angleX, double angleY, double angleZ)

Set this matrix to a rotation of <code>angleX</code> radians about the X axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> This method is equivalent to calling: <code>rotationX(angleX).rotateY(angleY).rotateZ(angleZ)</code>

rotationY
Matrix3d rotationY(double ang)

Set this matrix to a rotation transformation about the Y axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotationYXZ
Matrix3d rotationYXZ(double angleY, double angleX, double angleZ)

Set this matrix to a rotation of <code>angleY</code> radians about the Y axis, followed by a rotation of <code>angleX</code> radians about the X axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> This method is equivalent to calling: <code>rotationY(angleY).rotateX(angleX).rotateZ(angleZ)</code>

rotationZ
Matrix3d rotationZ(double ang)

Set this matrix to a rotation transformation about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations">http://en.wikipedia.org</a>

rotationZYX
Matrix3d rotationZYX(double angleZ, double angleY, double angleX)

Set this matrix to a rotation of <code>angleZ</code> radians about the Z axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleX</code> radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin. When used with a left-handed coordinate system, the rotation is clockwise. <p> This method is equivalent to calling: <code>rotationZ(angleZ).rotateY(angleY).rotateX(angleX)</code>

scale
Matrix3d scale(double xyz)

Apply scaling to this matrix by uniformly scaling all base axes by the given <code>xyz</code> factor. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code> , the scaling will be applied first!

scale
Matrix3d scale(double xyz, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
scale
Matrix3d scale(double x, double y, double z)

Apply scaling to this matrix by scaling the base axes by the given x, y and z factors. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code> , the scaling will be applied first!

scale
Matrix3d scale(double x, double y, double z, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
scale
Matrix3d scale(Vector3d xyz)

Apply scaling to this matrix by scaling the base axes by the given <code>xyz.x</code>, <code>xyz.y</code> and <code>xyz.z</code> factors, respectively. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * S * v</code>, the scaling will be applied first!

scale
Matrix3d scale(Vector3d xyz, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleLocal
Matrix3d scaleLocal(double x, double y, double z)

Pre-multiply scaling to this matrix by scaling the base axes by the given x, y and z factors. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>S * M</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>S * M * v</code>, the scaling will be applied last!

scaleLocal
Matrix3d scaleLocal(double x, double y, double z, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
scaling
Matrix3d scaling(Vector3d xyz)

Set this matrix to be a simple scale matrix which scales the base axes by <code>xyz.x</code>, <code>xyz.y</code> and <code>xyz.z</code> respectively. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling. <p> In order to post-multiply a scaling transformation directly to a matrix use {@link #scale(Vector3d) scale()} instead.

scaling
Matrix3d scaling(double x, double y, double z)

Set this matrix to be a simple scale matrix.

scaling
Matrix3d scaling(double factor)

Set this matrix to be a simple scale matrix, which scales all axes uniformly by the given factor. <p> The resulting matrix can be multiplied against another transformation matrix to obtain an additional scaling. <p> In order to post-multiply a scaling transformation directly to a matrix, use {@link #scale(double) scale()} instead.

set
Matrix3d set(int column, int row, double value)

Set the matrix element at the given column and row to the specified value.

set
Matrix3d set(Vector3d col0, Vector3d col1, Vector3d col2)

Set the three columns of this matrix to the supplied vectors, respectively.

set
Matrix3d set(double[] m)

Set the values in this matrix based on the supplied double array. The result looks like this: <p> 0, 3, 6<br> 1, 4, 7<br> 2, 5, 8<br> <p> Only uses the first 9 values, all others are ignored.

set
Matrix3d set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)

Set the values within this matrix to the supplied double values. The result looks like this: <p> m00, m10, m20<br> m01, m11, m21<br> m02, m12, m22<br>

set
Matrix3d set(Quaterniond q)

Set this matrix to a rotation - and possibly scaling - equivalent to the given quaternion. <p> This method is equivalent to calling: <code>rotation(q)</code> <p> Reference: <a href="http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/">http://www.euclideanspace.com/</a>

set
Matrix3d set(AxisAngle4d axisAngle)

Set this matrix to be equivalent to the rotation specified by the given {@link AxisAngle4d}.

set
Matrix3d set(Matrix2d mat)

Set the upper left 2x2 submatrix of this {@link Matrix3d} to the given {@link Matrix2d} and the rest to identity.

set
Matrix3d set(Matrix4d mat)

Set the elements of this matrix to the upper left 3x3 of the given {@link Matrix4d}.

set
Matrix3d set(Matrix4x3d m)

Set the elements of this matrix to the left 3x3 submatrix of <code>m</code>.

set
Matrix3d set(Matrix3d m)

Set the values in this matrix to the ones in m.

setColumn
Matrix3d setColumn(int column, double x, double y, double z)

Set the column at the given <code>column</code> index, starting with <code>0</code>.

setColumn
Matrix3d setColumn(int column, Vector3d src)

Set the column at the given <code>column</code> index, starting with <code>0</code>.

setLookAlong
Matrix3d setLookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)

Set this matrix to a rotation transformation to make <code>-z</code> point along <code>dir</code>. <p> In order to apply the lookalong transformation to any previous existing transformation, use {@link #lookAlong(double, double, double, double, double, double) lookAlong()}

setLookAlong
Matrix3d setLookAlong(Vector3d dir, Vector3d up)

Set this matrix to a rotation transformation to make <code>-z</code> point along <code>dir</code>. <p> In order to apply the lookalong transformation to any previous existing transformation, use {@link #lookAlong(Vector3d, Vector3d)}.

setRow
Matrix3d setRow(int row, double x, double y, double z)

Set the row at the given <code>row</code> index, starting with <code>0</code>.

setRow
Matrix3d setRow(int row, Vector3d src)

Set the row at the given <code>row</code> index, starting with <code>0</code>.

setRowColumn
Matrix3d setRowColumn(int row, int column, double value)

Set the matrix element at the given row and column to the specified value.

setSkewSymmetric
Matrix3d setSkewSymmetric(double a, double b, double c)

Set this matrix to a skew-symmetric matrix using the following layout: <pre> 0, a, -b -a, 0, c b, -c, 0 </pre>

setTransposed
Matrix3d setTransposed(Matrix3d m)

Store the values of the transpose of the given matrix <code>m</code> into <code>this</code> matrix.

setm00
Matrix3d setm00(double m00)

Set the value of the matrix element at column 0 and row 0.

setm01
Matrix3d setm01(double m01)

Set the value of the matrix element at column 0 and row 1.

setm02
Matrix3d setm02(double m02)

Set the value of the matrix element at column 0 and row 2.

setm10
Matrix3d setm10(double m10)

Set the value of the matrix element at column 1 and row 0.

setm11
Matrix3d setm11(double m11)

Set the value of the matrix element at column 1 and row 1.

setm12
Matrix3d setm12(double m12)

Set the value of the matrix element at column 1 and row 2.

setm20
Matrix3d setm20(double m20)

Set the value of the matrix element at column 2 and row 0.

setm21
Matrix3d setm21(double m21)

Set the value of the matrix element at column 2 and row 1.

setm22
Matrix3d setm22(double m22)

Set the value of the matrix element at column 2 and row 2.

sub
Matrix3d sub(Matrix3d subtrahend)

Component-wise subtract <code>subtrahend</code> from <code>this</code>.

sub
Matrix3d sub(Matrix3d subtrahend, Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
swap
Matrix3d swap(Matrix3d other)

Exchange the values of <code>this</code> matrix with the given <code>other</code> matrix.

transform
Vector3d transform(double x, double y, double z, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
transform
Vector3d transform(Vector3d v, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
transform
Vector3d transform(Vector3d v)
Undocumented in source. Be warned that the author may not have intended to support it.
transformTranspose
Vector3d transformTranspose(double x, double y, double z, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
transformTranspose
Vector3d transformTranspose(Vector3d v, Vector3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
transformTranspose
Vector3d transformTranspose(Vector3d v)
Undocumented in source. Be warned that the author may not have intended to support it.
transpose
Matrix3d transpose(Matrix3d dest)
Undocumented in source. Be warned that the author may not have intended to support it.
transpose
Matrix3d transpose()

Transpose this matrix.

zero
Matrix3d zero()

Set all the values within this matrix to 0.

Variables

m00
double m00;
Undocumented in source.
m01
double m01;
Undocumented in source.
m02
double m02;
Undocumented in source.
m10
double m10;
Undocumented in source.
m11
double m11;
Undocumented in source.
m12
double m12;
Undocumented in source.
m20
double m20;
Undocumented in source.
m21
double m21;
Undocumented in source.
m22
double m22;
Undocumented in source.

Meta