public class Matrix3 extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static Matrix3 |
IDENTITY
the identity matrix.
|
float |
m00
The values of the matrix.
|
float |
m01 |
float |
m02 |
float |
m10
The values of the matrix.
|
float |
m11 |
float |
m12 |
float |
m20
The values of the matrix.
|
float |
m21 |
float |
m22 |
Constructor and Description |
---|
Matrix3()
Creates an identity matrix.
|
Matrix3(float[] values)
Creates a matrix from an array of values.
|
Matrix3(float m00,
float m10,
float m20,
float m01,
float m11,
float m21,
float m02,
float m12,
float m22)
Creates a matrix from its components.
|
Matrix3(Matrix3 other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Matrix3 |
add(pythagoras.f.IMatrix3 other)
Adds this matrix to another.
|
Matrix3 |
add(pythagoras.f.IMatrix3 other,
Matrix3 result)
Adds this matrix to another and stores the result in the object provided.
|
Matrix3 |
addLocal(pythagoras.f.IMatrix3 other)
Adds
other to this matrix, in place. |
float |
approximateUniformScale()
Returns an approximation of the uniform scale for this matrix (the square root of the
signed area of the parallelogram spanned by the axis vectors).
|
float |
element(int row,
int col)
Returns the matrix element at the specified row and column.
|
boolean |
equals(Object other) |
float |
extractRotation()
Extracts the rotation component of the matrix.
|
Vector |
extractScale()
Extracts the scale component of the matrix.
|
Vector |
extractScale(Vector result)
Extracts the scale component of the matrix and places it in the provided result vector.
|
FloatBuffer |
get(FloatBuffer buf)
Places the contents of this matrix into the given buffer in the standard OpenGL order.
|
void |
getColumn(int col,
Vector3 result)
Copies the requested column (0, 1, 2) into
result . |
void |
getRow(int row,
Vector3 result)
Copies the requested row (0, 1, 2) into
result . |
int |
hashCode() |
Matrix3 |
invert()
Inverts this matrix.
|
Matrix3 |
invert(Matrix3 result)
Inverts this matrix and places the result in the given object.
|
Matrix3 |
invertAffine()
Inverts this matrix as an affine matrix.
|
Matrix3 |
invertAffine(Matrix3 result)
Inverts this matrix as an affine matrix and places the result in the given object.
|
Matrix3 |
invertAffineLocal()
Inverts this matrix in-place as an affine matrix.
|
Matrix3 |
invertLocal()
Inverts this matrix in-place.
|
boolean |
isAffine()
Determines whether this matrix represents an affine transformation.
|
Matrix3 |
lerp(pythagoras.f.IMatrix3 other,
float t)
Linearly interpolates between this and the specified other matrix.
|
Matrix3 |
lerp(pythagoras.f.IMatrix3 other,
float t,
Matrix3 result)
Linearly interpolates between this and the specified other matrix, placing the result in
the object provided.
|
Matrix3 |
lerpAffine(pythagoras.f.IMatrix3 other,
float t)
Linearly interpolates between this and the specified other matrix, treating the matrices as
affine.
|
Matrix3 |
lerpAffine(pythagoras.f.IMatrix3 other,
float t,
Matrix3 result)
Linearly interpolates between this and the specified other matrix (treating the matrices as
affine), placing the result in the object provided.
|
Matrix3 |
lerpAffineLocal(pythagoras.f.IMatrix3 other,
float t)
Linearly interpolates between this and the specified other matrix (treating the matrices as
affine), placing the result in this matrix.
|
Matrix3 |
lerpLocal(pythagoras.f.IMatrix3 other,
float t)
Linearly interpolates between the this and the specified other matrix, placing the result in
this matrix.
|
float |
m00()
Returns column 0, row 0 of the matrix.
|
float |
m01()
Returns column 0, row 1 of the matrix.
|
float |
m02()
Returns column 0, row 2 of the matrix.
|
float |
m10()
Returns column 1, row 0 of the matrix.
|
float |
m11()
Returns column 1, row 1 of the matrix.
|
float |
m12()
Returns column 1, row 2 of the matrix.
|
float |
m20()
Returns column 2, row 0 of the matrix.
|
float |
m21()
Returns column 2, row 1 of the matrix.
|
float |
m22()
Returns column 2, row 2 of the matrix.
|
Matrix3 |
mult(pythagoras.f.IMatrix3 other)
Multiplies this matrix by another.
|
Matrix3 |
mult(pythagoras.f.IMatrix3 other,
Matrix3 result)
Multiplies this matrix by another and stores the result in the object provided.
|
Matrix3 |
multAffine(pythagoras.f.IMatrix3 other)
Multiplies this matrix by another, treating the matrices as affine.
|
Matrix3 |
multAffine(pythagoras.f.IMatrix3 other,
Matrix3 result)
Multiplies this matrix by another, treating the matrices as affine, and stores the result
in the object provided.
|
Matrix3 |
multAffineLocal(pythagoras.f.IMatrix3 other)
Multiplies this matrix in-place by another, treating the matricees as affine.
|
Matrix3 |
multLocal(pythagoras.f.IMatrix3 other)
Multiplies this matrix in-place by another.
|
Matrix3 |
set(float[] values)
Copies the elements of an array.
|
Matrix3 |
set(float m00,
float m10,
float m20,
float m01,
float m11,
float m21,
float m02,
float m12,
float m22)
Sets all of the matrix's components at once.
|
Matrix3 |
set(pythagoras.f.IMatrix3 other)
Copies the contents of another matrix.
|
void |
setColumn(int col,
float x,
float y,
float z)
Sets the specified column (0, 1, 2) to the supplied values.
|
void |
setColumn(int col,
Vector3 v)
Sets the specified column (0, 1, 2) to the supplied vector.
|
void |
setElement(int row,
int col,
float value)
Sets the matrix element at the specified row and column.
|
void |
setRow(int row,
float x,
float y,
float z)
Sets the specified row (0, 1, 2) to the supplied values.
|
void |
setRow(int row,
Vector3 v)
Sets the specified row (0, 1, 2) to the supplied vector.
|
Matrix3 |
setToIdentity()
Sets this matrix to the identity matrix.
|
Matrix3 |
setToReflection(float x,
float y,
float z)
Sets this to a reflection across a plane intersecting the origin with the supplied normal.
|
Matrix3 |
setToReflection(IVector3 normal)
Sets this to a reflection across a plane intersecting the origin with the supplied normal.
|
Matrix3 |
setToRotation(float angle)
Sets this to a rotation matrix.
|
Matrix3 |
setToRotation(float angle,
float x,
float y,
float z)
Sets this to a rotation matrix.
|
Matrix3 |
setToRotation(float angle,
IVector3 axis)
Sets this to a rotation matrix.
|
Matrix3 |
setToRotation(IQuaternion quat)
Sets this to a rotation matrix.
|
Matrix3 |
setToRotation(IVector3 from,
IVector3 to)
Sets this to a rotation matrix that rotates one vector onto another.
|
Matrix3 |
setToScale(float s)
Sets this to a uniform scale matrix.
|
Matrix3 |
setToScale(float x,
float y,
float z)
Sets this to a scale matrix.
|
Matrix3 |
setToScale(IVector3 scale)
Sets this to a scale matrix.
|
Matrix3 |
setToTransform(IVector translation,
float rotation)
Sets this to a matrix that first rotates, then translates.
|
Matrix3 |
setToTransform(IVector translation,
float rotation,
float scale)
Sets this to a matrix that first scales, then rotates, then translates.
|
Matrix3 |
setToTransform(IVector translation,
float rotation,
IVector scale)
Sets this to a matrix that first scales, then rotates, then translates.
|
Matrix3 |
setToTranslation(float x,
float y)
Sets this to a translation matrix.
|
Matrix3 |
setToTranslation(IVector translation)
Sets this to a translation matrix.
|
Matrix3 |
setToZero()
Sets this matrix to all zeroes.
|
Matrix3 |
setTranslation(float x,
float y)
Sets the translation component of this matrix.
|
Matrix3 |
setTranslation(IVector translation)
Sets the translation component of this matrix.
|
String |
toString() |
Vector3 |
transform(IVector3 vector)
Transforms a vector by this matrix.
|
Vector3 |
transform(IVector3 vector,
Vector3 result)
Transforms a vector by this matrix and places the result in the object provided.
|
Vector3 |
transformLocal(Vector3 vector)
Transforms a vector in-place by the inner 3x3 part of this matrix.
|
Vector |
transformPoint(IVector point)
Transforms a point by this matrix.
|
Vector |
transformPoint(IVector point,
Vector result)
Transforms a point by this matrix and places the result in the object provided.
|
Vector |
transformPointLocal(Vector point)
Transforms a point in-place by this matrix.
|
Vector |
transformVector(IVector vector)
Transforms a vector by this inner 2x2 part of this matrix.
|
Vector |
transformVector(IVector vector,
Vector result)
Transforms a vector by the inner 2x2 part of this matrix and places the result in the object
provided.
|
Vector |
transformVectorLocal(Vector vector)
Transforms a vector in-place by the inner 2x2 part of this matrix.
|
Matrix3 |
transpose()
Transposes this matrix.
|
Matrix3 |
transpose(Matrix3 result)
Transposes this matrix, storing the result in the provided object.
|
Matrix3 |
transposeLocal()
Transposes this matrix in-place.
|
public static final Matrix3 IDENTITY
public float m00
mCOLROW
.public float m10
mCOLROW
.public float m20
mCOLROW
.public float m01
public float m11
public float m21
public float m02
public float m12
public float m22
public Matrix3(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22)
public Matrix3(float[] values)
public Matrix3(Matrix3 other)
public Matrix3()
public void setElement(int row, int col, float value)
public void setRow(int row, float x, float y, float z)
public void setRow(int row, Vector3 v)
public void setColumn(int col, float x, float y, float z)
public void setColumn(int col, Vector3 v)
public Matrix3 setToIdentity()
public Matrix3 setToZero()
public Matrix3 setToRotation(IVector3 from, IVector3 to)
public Matrix3 setToRotation(float angle, IVector3 axis)
public Matrix3 setToRotation(float angle, float x, float y, float z)
public Matrix3 setToRotation(IQuaternion quat)
public Matrix3 setToScale(IVector3 scale)
public Matrix3 setToScale(float s)
public Matrix3 setToScale(float x, float y, float z)
public Matrix3 setToReflection(IVector3 normal)
public Matrix3 setToReflection(float x, float y, float z)
public Matrix3 setToTransform(IVector translation, float rotation)
public Matrix3 setToTransform(IVector translation, float rotation, float scale)
public Matrix3 setToTransform(IVector translation, float rotation, IVector scale)
public Matrix3 setToTranslation(IVector translation)
public Matrix3 setToTranslation(float x, float y)
public Matrix3 setTranslation(IVector translation)
public Matrix3 setTranslation(float x, float y)
public Matrix3 setToRotation(float angle)
public Matrix3 transposeLocal()
public Matrix3 multLocal(pythagoras.f.IMatrix3 other)
public Matrix3 addLocal(pythagoras.f.IMatrix3 other)
other
to this matrix, in place.public Matrix3 multAffineLocal(pythagoras.f.IMatrix3 other)
public Matrix3 invertLocal()
public Matrix3 invertAffineLocal()
public Matrix3 lerpLocal(pythagoras.f.IMatrix3 other, float t)
public Matrix3 lerpAffineLocal(pythagoras.f.IMatrix3 other, float t)
public Matrix3 set(pythagoras.f.IMatrix3 other)
public Matrix3 set(float[] values)
public Matrix3 set(float m00, float m10, float m20, float m01, float m11, float m21, float m02, float m12, float m22)
public float m00()
public float m10()
public float m20()
public float m01()
public float m11()
public float m21()
public float m02()
public float m12()
public float m22()
public float element(int row, int col)
public void getRow(int row, Vector3 result)
result
.public void getColumn(int col, Vector3 result)
result
.public Matrix3 transpose()
public Matrix3 transpose(Matrix3 result)
public Matrix3 mult(pythagoras.f.IMatrix3 other)
public Matrix3 mult(pythagoras.f.IMatrix3 other, Matrix3 result)
public Matrix3 add(pythagoras.f.IMatrix3 other)
public Matrix3 add(pythagoras.f.IMatrix3 other, Matrix3 result)
public boolean isAffine()
public Matrix3 multAffine(pythagoras.f.IMatrix3 other)
public Matrix3 multAffine(pythagoras.f.IMatrix3 other, Matrix3 result)
public Matrix3 invert()
public Matrix3 invert(Matrix3 result) throws SingularMatrixException
SingularMatrixException
public Matrix3 invertAffine()
public Matrix3 invertAffine(Matrix3 result) throws SingularMatrixException
SingularMatrixException
public Matrix3 lerp(pythagoras.f.IMatrix3 other, float t)
public Matrix3 lerp(pythagoras.f.IMatrix3 other, float t, Matrix3 result)
public Matrix3 lerpAffine(pythagoras.f.IMatrix3 other, float t)
public Matrix3 lerpAffine(pythagoras.f.IMatrix3 other, float t, Matrix3 result)
public FloatBuffer get(FloatBuffer buf)
public Vector3 transformLocal(Vector3 vector)
public Vector3 transform(IVector3 vector)
public Vector3 transform(IVector3 vector, Vector3 result)
public Vector transformPointLocal(Vector point)
public Vector transformPoint(IVector point)
public Vector transformPoint(IVector point, Vector result)
public Vector transformVectorLocal(Vector vector)
public Vector transformVector(IVector vector)
public Vector transformVector(IVector vector, Vector result)
public float extractRotation()
public Vector extractScale()
public Vector extractScale(Vector result)
public float approximateUniformScale()
Copyright © 2017. All rights reserved.