|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.Matrix3f
public final class Matrix3f
A 3x3 column-major matrix.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
static Matrix3f |
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 Summary | |
|---|---|
Matrix3f()
Creates an identity matrix. |
|
Matrix3f(float[] values)
Creates a matrix from an array of values. |
|
Matrix3f(float m00,
float m10,
float m20,
float m01,
float m11,
float m21,
float m02,
float m12,
float m22)
Creates a matrix from its components. |
|
Matrix3f(Matrix3f other)
Copy constructor. |
|
| Method Summary | |
|---|---|
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). |
void |
decodeFromStream(DataInputStream in)
Initializes this object with data read from the specified stream. |
void |
decodeFromString(String string)
Initializes this object with the contents of the specified string. |
void |
encodeToStream(DataOutputStream out)
Encodes this object to the specified stream. |
String |
encodeToString()
Returns a string representation of this object. |
boolean |
equals(Object other)
|
float |
extractRotation()
Extracts the rotation component of the matrix. |
Vector2f |
extractScale()
Extracts the scale component of the matrix. |
Vector2f |
extractScale(Vector2f 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. |
int |
hashCode()
|
Matrix3f |
invert()
Inverts this matrix. |
Matrix3f |
invert(Matrix3f result)
Inverts this matrix and places the result in the given object. |
Matrix3f |
invertAffine()
Inverts this matrix as an affine matrix. |
Matrix3f |
invertAffine(Matrix3f result)
Inverts this matrix as an affine matrix and places the result in the given object. |
Matrix3f |
invertAffineLocal()
Inverts this matrix in-place as an affine matrix. |
Matrix3f |
invertLocal()
Inverts this matrix in-place. |
boolean |
isAffine()
Determines whether this matrix represents an affine transformation. |
Matrix3f |
lerp(Matrix3f other,
float t)
Linearly interpolates between this and the specified other matrix. |
Matrix3f |
lerp(Matrix3f other,
float t,
Matrix3f result)
Linearly interpolates between this and the specified other matrix, placing the result in the object provided. |
Matrix3f |
lerpAffine(Matrix3f other,
float t)
Linearly interpolates between this and the specified other matrix, treating the matrices as affine. |
Matrix3f |
lerpAffine(Matrix3f other,
float t,
Matrix3f result)
Linearly interpolates between this and the specified other matrix (treating the matrices as affine), placing the result in the object provided. |
Matrix3f |
lerpAffineLocal(Matrix3f other,
float t)
Linearly interpolates between this and the specified other matrix (treating the matrices as affine), placing the result in this matrix. |
Matrix3f |
lerpLocal(Matrix3f other,
float t)
Linearly interpolates between the this and the specified other matrix, placing the result in this matrix. |
Matrix3f |
mult(Matrix3f other)
Multiplies this matrix by another. |
Matrix3f |
mult(Matrix3f other,
Matrix3f result)
Multiplies this matrix by another and stores the result in the object provided. |
Matrix3f |
multAffine(Matrix3f other)
Multiplies this matrix by another, treating the matrices as affine. |
Matrix3f |
multAffine(Matrix3f other,
Matrix3f result)
Multiplies this matrix by another, treating the matrices as affine, and stores the result in the object provided. |
Matrix3f |
multAffineLocal(Matrix3f other)
Multiplies this matrix in-place by another, treating the matricees as affine. |
Matrix3f |
multLocal(Matrix3f other)
Multiplies this matrix in-place by another. |
Matrix3f |
set(float[] values)
Copies the elements of an array. |
Matrix3f |
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. |
Matrix3f |
set(Matrix3f other)
Copies the contents of another matrix. |
Matrix3f |
setToIdentity()
Sets this matrix to the identity matrix. |
Matrix3f |
setToReflection(float x,
float y,
float z)
Sets this to a reflection across a plane intersecting the origin with the supplied normal. |
Matrix3f |
setToReflection(Vector3f normal)
Sets this to a reflection across a plane intersecting the origin with the supplied normal. |
Matrix3f |
setToRotation(float angle)
Sets this to a rotation matrix. |
Matrix3f |
setToRotation(float angle,
float x,
float y,
float z)
Sets this to a rotation matrix. |
Matrix3f |
setToRotation(float angle,
Vector3f axis)
Sets this to a rotation matrix. |
Matrix3f |
setToRotation(Quaternion quat)
Sets this to a rotation matrix. |
Matrix3f |
setToRotation(Vector3f from,
Vector3f to)
Sets this to a rotation matrix that rotates one vector onto another. |
Matrix3f |
setToScale(float s)
Sets this to a uniform scale matrix. |
Matrix3f |
setToScale(float x,
float y,
float z)
Sets this to a scale matrix. |
Matrix3f |
setToScale(Vector3f scale)
Sets this to a scale matrix. |
Matrix3f |
setToTransform(Vector2f translation,
float rotation)
Sets this to a matrix that first rotates, then translates. |
Matrix3f |
setToTransform(Vector2f translation,
float rotation,
float scale)
Sets this to a matrix that first scales, then rotates, then translates. |
Matrix3f |
setToTransform(Vector2f translation,
float rotation,
Vector2f scale)
Sets this to a matrix that first scales, then rotates, then translates. |
Matrix3f |
setToTranslation(float x,
float y)
Sets this to a translation matrix. |
Matrix3f |
setToTranslation(Vector2f translation)
Sets this to a translation matrix. |
Matrix3f |
setTranslation(float x,
float y)
Sets the translation component of this matrix. |
Matrix3f |
setTranslation(Vector2f translation)
Sets the translation component of this matrix. |
String |
toString()
|
Vector3f |
transform(Vector3f vector)
Transforms a vector by this matrix. |
Vector3f |
transform(Vector3f vector,
Vector3f result)
Transforms a vector by this matrix and places the result in the object provided. |
Vector3f |
transformLocal(Vector3f vector)
Transforms a vector in-place by the inner 3x3 part of this matrix. |
Vector2f |
transformPoint(Vector2f point)
Transforms a point by this matrix. |
Vector2f |
transformPoint(Vector2f point,
Vector2f result)
Transforms a point by this matrix and places the result in the object provided. |
Vector2f |
transformPointLocal(Vector2f point)
Transforms a point in-place by this matrix. |
Vector2f |
transformVector(Vector2f vector)
Transforms a vector by this inner 2x2 part of this matrix. |
Vector2f |
transformVector(Vector2f vector,
Vector2f result)
Transforms a vector by the inner 2x2 part of this matrix and places the result in the object provided. |
Vector2f |
transformVectorLocal(Vector2f vector)
Transforms a vector in-place by the inner 2x2 part of this matrix. |
Matrix3f |
transpose()
Transposes this matrix. |
Matrix3f |
transpose(Matrix3f result)
Transposes this matrix, storing the result in the provided object. |
Matrix3f |
transposeLocal()
Transposes this matrix in-place. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Matrix3f IDENTITY
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
| Constructor Detail |
|---|
public Matrix3f(float m00,
float m10,
float m20,
float m01,
float m11,
float m21,
float m02,
float m12,
float m22)
public Matrix3f(float[] values)
public Matrix3f(Matrix3f other)
public Matrix3f()
| Method Detail |
|---|
public Matrix3f setToIdentity()
public Matrix3f setToRotation(Vector3f from,
Vector3f to)
public Matrix3f setToRotation(float angle,
Vector3f axis)
public Matrix3f setToRotation(float angle,
float x,
float y,
float z)
public Matrix3f setToRotation(Quaternion quat)
public Matrix3f setToScale(Vector3f scale)
public Matrix3f setToScale(float s)
public Matrix3f setToScale(float x,
float y,
float z)
public Matrix3f setToReflection(Vector3f normal)
public Matrix3f setToReflection(float x,
float y,
float z)
public Matrix3f setToTransform(Vector2f translation,
float rotation)
public Matrix3f setToTransform(Vector2f translation,
float rotation,
float scale)
public Matrix3f setToTransform(Vector2f translation,
float rotation,
Vector2f scale)
public Matrix3f setToTranslation(Vector2f translation)
public Matrix3f setToTranslation(float x,
float y)
public Matrix3f setTranslation(Vector2f translation)
public Matrix3f setTranslation(float x,
float y)
public Matrix3f setToRotation(float angle)
public Matrix3f transposeLocal()
public Matrix3f transpose()
public Matrix3f transpose(Matrix3f result)
public Matrix3f multLocal(Matrix3f other)
public Matrix3f mult(Matrix3f other)
public Matrix3f mult(Matrix3f other,
Matrix3f result)
public boolean isAffine()
public Matrix3f multAffineLocal(Matrix3f other)
public Matrix3f multAffine(Matrix3f other)
public Matrix3f multAffine(Matrix3f other,
Matrix3f result)
public Matrix3f invertLocal()
public Matrix3f invert()
public Matrix3f invert(Matrix3f result)
throws SingularMatrixException
SingularMatrixExceptionpublic Matrix3f invertAffineLocal()
public Matrix3f invertAffine()
public Matrix3f invertAffine(Matrix3f result)
throws SingularMatrixException
SingularMatrixException
public Matrix3f lerpLocal(Matrix3f other,
float t)
public Matrix3f lerp(Matrix3f other,
float t)
public Matrix3f lerp(Matrix3f other,
float t,
Matrix3f result)
public Matrix3f lerpAffineLocal(Matrix3f other,
float t)
public Matrix3f lerpAffine(Matrix3f other,
float t)
public Matrix3f lerpAffine(Matrix3f other,
float t,
Matrix3f result)
public Matrix3f set(Matrix3f other)
public Matrix3f set(float[] values)
public Matrix3f set(float m00,
float m10,
float m20,
float m01,
float m11,
float m21,
float m02,
float m12,
float m22)
public FloatBuffer get(FloatBuffer buf)
public Vector3f transformLocal(Vector3f vector)
public Vector3f transform(Vector3f vector)
public Vector3f transform(Vector3f vector,
Vector3f result)
public Vector2f transformPointLocal(Vector2f point)
public Vector2f transformPoint(Vector2f point)
public Vector2f transformPoint(Vector2f point,
Vector2f result)
public Vector2f transformVectorLocal(Vector2f vector)
public Vector2f transformVector(Vector2f vector)
public Vector2f transformVector(Vector2f vector,
Vector2f result)
public float extractRotation()
public Vector2f extractScale()
public Vector2f extractScale(Vector2f result)
public float approximateUniformScale()
public String encodeToString()
Encodable
encodeToString in interface Encodable
public void decodeFromString(String string)
throws Exception
Encodable
decodeFromString in interface EncodableException
public void encodeToStream(DataOutputStream out)
throws IOException
Encodable
encodeToStream in interface EncodableIOException
public void decodeFromStream(DataInputStream in)
throws IOException
Encodable
decodeFromStream in interface EncodableIOExceptionpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||