pythagoras.d

## Interface IMatrix4

• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` `approximateUniformScale()`
Returns an approximation of the uniform scale for this matrix (the cube root of the signed volume of the parallelepiped spanned by the axis vectors).
`boolean` ```epsilonEquals(IMatrix4 other, double epsilon)```
Compares this matrix to another with the provided epsilon.
`Quaternion` `extractRotation()`
Extracts the rotation component of the matrix.
`Quaternion` `extractRotation(Quaternion result)`
Extracts the rotation component of the matrix and places it in the provided result quaternion.
`Matrix3` `extractRotationScale(Matrix3 result)`
Extracts the rotation and scale components and places them in the provided result.
`Vector3` `extractScale()`
Extracts the scale component of the matrix.
`Vector3` `extractScale(Vector3 result)`
Extracts the scale component of the matrix and places it in the provided result vector.
`DoubleBuffer` `get(DoubleBuffer buf)`
Places the contents of this matrix into the given buffer in the standard OpenGL order.
`Matrix4` `invert()`
Inverts this matrix.
`Matrix4` `invert(Matrix4 result)`
Inverts this matrix and places the result in the given object.
`Matrix4` `invertAffine()`
Inverts this matrix as an affine matrix.
`Matrix4` `invertAffine(Matrix4 result)`
Inverts this matrix as an affine matrix and places the result in the given object.
`boolean` `isAffine()`
Determines whether this matrix represents an affine transformation.
`boolean` `isMirrored()`
Determines whether the matrix is mirrored.
`Matrix4` ```lerp(IMatrix4 other, double t)```
Linearly interpolates between this and the specified other matrix.
`Matrix4` ```lerp(IMatrix4 other, double t, Matrix4 result)```
Linearly interpolates between this and the specified other matrix, placing the result in the object provided.
`Matrix4` ```lerpAffine(IMatrix4 other, double t)```
Linearly interpolates between this and the specified other matrix, treating the matrices as affine.
`Matrix4` ```lerpAffine(IMatrix4 other, double t, Matrix4 result)```
Linearly interpolates between this and the specified other matrix (treating the matrices as affine), placing the result in the object provided.
`double` `m00()`
Returns the (0,0)th component of the matrix.
`double` `m01()`
Returns the (0,1)th component of the matrix.
`double` `m02()`
Returns the (0,2)th component of the matrix.
`double` `m03()`
Returns the (0,3)th component of the matrix.
`double` `m10()`
Returns the (1,0)th component of the matrix.
`double` `m11()`
Returns the (1,1)th component of the matrix.
`double` `m12()`
Returns the (1,2)th component of the matrix.
`double` `m13()`
Returns the (1,3)th component of the matrix.
`double` `m20()`
Returns the (2,0)th component of the matrix.
`double` `m21()`
Returns the (2,1)th component of the matrix.
`double` `m22()`
Returns the (2,2)th component of the matrix.
`double` `m23()`
Returns the (2,3)th component of the matrix.
`double` `m30()`
Returns the (3,0)th component of the matrix.
`double` `m31()`
Returns the (3,1)th component of the matrix.
`double` `m32()`
Returns the (3,2)th component of the matrix.
`double` `m33()`
Returns the (3,3)th component of the matrix.
`Matrix4` `mult(IMatrix4 other)`
Multiplies this matrix by another.
`Matrix4` ```mult(IMatrix4 other, Matrix4 result)```
Multiplies this matrix by another and stores the result in the object provided.
`Matrix4` `multAffine(IMatrix4 other)`
Multiplies this matrix by another, treating the matrices as affine.
`Matrix4` ```multAffine(IMatrix4 other, Matrix4 result)```
Multiplies this matrix by another, treating the matrices as affine, and stores the result in the object provided.
`Vector3` `projectPoint(IVector3 point)`
Projects the supplied point using this matrix.
`Vector3` ```projectPoint(IVector3 point, Vector3 result)```
Projects the supplied point using this matrix and places the result in the object supplied.
`Vector3` `projectPointLocal(Vector3 point)`
Projects the supplied point in-place using this matrix.
`Vector4` `transform(IVector4 vector)`
Transforms `vector` by this matrix (M * V).
`Vector4` ```transform(IVector4 vector, Vector4 result)```
Transforms `vector` by this matrix (M * V) and stores the result in the object provided.
`Vector3` `transformPoint(IVector3 point)`
Transforms a point by this matrix.
`Vector3` ```transformPoint(IVector3 point, Vector3 result)```
Transforms a point by this matrix and places the result in the object provided.
`Vector3` `transformPointLocal(Vector3 point)`
Transforms a point in-place by this matrix.
`double` `transformPointZ(IVector3 point)`
Transforms a point by this matrix and returns the resulting z coordinate.
`Vector3` `transformVector(IVector3 vector)`
Transforms a vector by this inner 3x3 part of this matrix.
`Vector3` ```transformVector(IVector3 vector, Vector3 result)```
Transforms a vector by the inner 3x3 part of this matrix and places the result in the object provided.
`Vector3` `transformVectorLocal(Vector3 vector)`
Transforms a vector in-place by the inner 3x3 part of this matrix.
`Matrix4` `transpose()`
Transposes this matrix.
`Matrix4` `transpose(Matrix4 result)`
Transposes this matrix, storing the result in the provided object.
• ### Method Detail

• #### m00

`double m00()`
Returns the (0,0)th component of the matrix.
• #### m10

`double m10()`
Returns the (1,0)th component of the matrix.
• #### m20

`double m20()`
Returns the (2,0)th component of the matrix.
• #### m30

`double m30()`
Returns the (3,0)th component of the matrix.
• #### m01

`double m01()`
Returns the (0,1)th component of the matrix.
• #### m11

`double m11()`
Returns the (1,1)th component of the matrix.
• #### m21

`double m21()`
Returns the (2,1)th component of the matrix.
• #### m31

`double m31()`
Returns the (3,1)th component of the matrix.
• #### m02

`double m02()`
Returns the (0,2)th component of the matrix.
• #### m12

`double m12()`
Returns the (1,2)th component of the matrix.
• #### m22

`double m22()`
Returns the (2,2)th component of the matrix.
• #### m32

`double m32()`
Returns the (3,2)th component of the matrix.
• #### m03

`double m03()`
Returns the (0,3)th component of the matrix.
• #### m13

`double m13()`
Returns the (1,3)th component of the matrix.
• #### m23

`double m23()`
Returns the (2,3)th component of the matrix.
• #### m33

`double m33()`
Returns the (3,3)th component of the matrix.
• #### transpose

`Matrix4 transpose()`
Transposes this matrix.
Returns:
a new matrix containing the result.
• #### transpose

`Matrix4 transpose(Matrix4 result)`
Transposes this matrix, storing the result in the provided object.
Returns:
the result matrix, for chaining.
• #### mult

`Matrix4 mult(IMatrix4 other)`
Multiplies this matrix by another.
Returns:
a new matrix containing the result.
• #### mult

```Matrix4 mult(IMatrix4 other,
Matrix4 result)```
Multiplies this matrix by another and stores the result in the object provided.
Returns:
a reference to the result matrix, for chaining.
• #### isAffine

`boolean isAffine()`
Determines whether this matrix represents an affine transformation.
• #### isMirrored

`boolean isMirrored()`
Determines whether the matrix is mirrored.
• #### multAffine

`Matrix4 multAffine(IMatrix4 other)`
Multiplies this matrix by another, treating the matrices as affine.
Returns:
a new matrix containing the result.
• #### multAffine

```Matrix4 multAffine(IMatrix4 other,
Matrix4 result)```
Multiplies this matrix by another, treating the matrices as affine, and stores the result in the object provided.
Returns:
a reference to the result matrix, for chaining.
• #### invert

`Matrix4 invert()`
Inverts this matrix.
Returns:
a new matrix containing the result.
• #### invert

`Matrix4 invert(Matrix4 result)`
Inverts this matrix and places the result in the given object.
Returns:
a reference to the result matrix, for chaining.
• #### invertAffine

`Matrix4 invertAffine()`
Inverts this matrix as an affine matrix.
Returns:
a new matrix containing the result.
• #### invertAffine

`Matrix4 invertAffine(Matrix4 result)`
Inverts this matrix as an affine matrix and places the result in the given object.
Returns:
a reference to the result matrix, for chaining.
• #### lerp

```Matrix4 lerp(IMatrix4 other,
double t)```
Linearly interpolates between this and the specified other matrix.
Returns:
a new matrix containing the result.
• #### lerp

```Matrix4 lerp(IMatrix4 other,
double t,
Matrix4 result)```
Linearly interpolates between this and the specified other matrix, placing the result in the object provided.
Returns:
a reference to the result object, for chaining.
• #### lerpAffine

```Matrix4 lerpAffine(IMatrix4 other,
double t)```
Linearly interpolates between this and the specified other matrix, treating the matrices as affine.
Returns:
a new matrix containing the result.
• #### lerpAffine

```Matrix4 lerpAffine(IMatrix4 other,
double t,
Matrix4 result)```
Linearly interpolates between this and the specified other matrix (treating the matrices as affine), placing the result in the object provided.
Returns:
a reference to the result object, for chaining.
• #### get

`DoubleBuffer get(DoubleBuffer buf)`
Places the contents of this matrix into the given buffer in the standard OpenGL order.
Returns:
a reference to the buffer, for chaining.
• #### projectPointLocal

`Vector3 projectPointLocal(Vector3 point)`
Projects the supplied point in-place using this matrix.
Returns:
a reference to the point, for chaining.
• #### projectPoint

`Vector3 projectPoint(IVector3 point)`
Projects the supplied point using this matrix.
Returns:
a new vector containing the result.
• #### projectPoint

```Vector3 projectPoint(IVector3 point,
Vector3 result)```
Projects the supplied point using this matrix and places the result in the object supplied.
Returns:
a reference to the result vector, for chaining.
• #### transformPointLocal

`Vector3 transformPointLocal(Vector3 point)`
Transforms a point in-place by this matrix.
Returns:
a reference to the point, for chaining.
• #### transformPoint

`Vector3 transformPoint(IVector3 point)`
Transforms a point by this matrix.
Returns:
a new vector containing the result.
• #### transformPoint

```Vector3 transformPoint(IVector3 point,
Vector3 result)```
Transforms a point by this matrix and places the result in the object provided.
Returns:
a reference to the result, for chaining.
• #### transformPointZ

`double transformPointZ(IVector3 point)`
Transforms a point by this matrix and returns the resulting z coordinate.
• #### transformVectorLocal

`Vector3 transformVectorLocal(Vector3 vector)`
Transforms a vector in-place by the inner 3x3 part of this matrix.
Returns:
a reference to the vector, for chaining.
• #### transformVector

`Vector3 transformVector(IVector3 vector)`
Transforms a vector by this inner 3x3 part of this matrix.
Returns:
a new vector containing the result.
• #### transformVector

```Vector3 transformVector(IVector3 vector,
Vector3 result)```
Transforms a vector by the inner 3x3 part of this matrix and places the result in the object provided.
Returns:
a reference to the result, for chaining.
• #### transform

`Vector4 transform(IVector4 vector)`
Transforms `vector` by this matrix (M * V).
Returns:
a new vector containing the result.
• #### transform

```Vector4 transform(IVector4 vector,
Vector4 result)```
Transforms `vector` by this matrix (M * V) and stores the result in the object provided.
Returns:
a reference to the result vector, for chaining.
• #### extractRotation

`Quaternion extractRotation()`
Extracts the rotation component of the matrix.
Returns:
a new quaternion containing the result.
• #### extractRotation

`Quaternion extractRotation(Quaternion result)`
Extracts the rotation component of the matrix and places it in the provided result quaternion.
Returns:
a reference to the result quaternion, for chaining.
• #### extractRotationScale

`Matrix3 extractRotationScale(Matrix3 result)`
Extracts the rotation and scale components and places them in the provided result.
Returns:
a reference to `result`, for chaining.
• #### extractScale

`Vector3 extractScale()`
Extracts the scale component of the matrix.
Returns:
a new vector containing the result.
• #### extractScale

`Vector3 extractScale(Vector3 result)`
Extracts the scale component of the matrix and places it in the provided result vector.
Returns:
a reference to the result vector, for chaining.
• #### approximateUniformScale

`double approximateUniformScale()`
Returns an approximation of the uniform scale for this matrix (the cube root of the signed volume of the parallelepiped spanned by the axis vectors).
• #### epsilonEquals

```boolean epsilonEquals(IMatrix4 other,
double epsilon)```
Compares this matrix to another with the provided epsilon.