|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.emini.physics2D.util.FXMatrix
public class FXMatrix
The FXMatrix class represents a 2x2 matrix.
The matrix uses Fixpoint arithmetic.
In order to optimize rotation matrices, which are its main use,
the values are shifted by FXUtil.DECIMAL
+ FXUtil.ADD_MATRIX_DECIMAL
.
FXUtil
Field Summary | |
---|---|
float |
mCol1xFX
a11 (MatFX) |
float |
mCol1yFX
a12 (MatFX) |
float |
mCol2xFX
a21 (MatFX) |
float |
mCol2yFX
a22 (MatFX) |
Constructor Summary | |
---|---|
FXMatrix()
Empty constructor. |
|
FXMatrix(FXMatrix other)
Copy constructor. |
|
FXMatrix(int precision)
|
Method Summary | |
---|---|
void |
assign(FXMatrix other)
|
static FXMatrix |
createRotationMatrix(float rotation2FX)
Creates a 2D rotation matrix. |
void |
invert()
Inverts the matrix. |
FXVector |
mult(float xFX,
float yFX)
Multiplies the matrix with vector given as two coordinates (FX). |
void |
mult(float xFX,
float yFX,
FXVector target)
Multiplies the matrix with vector given as two coordinates (FX). |
FXVector |
mult(FXVector vector)
Multiplies the matrix with vector. |
void |
mult(FXVector vector,
FXVector target)
Multiplies the matrix with a vector (without object creation). |
float |
normMatFX()
Calculates the 1 norm. |
void |
setRotationMatrix(float rotation2FX)
Sets the matrix to a rotation matrix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float mCol1xFX
public float mCol1yFX
public float mCol2xFX
public float mCol2yFX
Constructor Detail |
---|
public FXMatrix()
public FXMatrix(int precision)
public FXMatrix(FXMatrix other)
other
- the matrix to copy.Method Detail |
---|
public void assign(FXMatrix other)
public static FXMatrix createRotationMatrix(float rotation2FX)
rotation2FX
- rotation angle in radians (2FX).public void setRotationMatrix(float rotation2FX)
rotation2FX
- rotation angle in radians (2FX).public final FXVector mult(FXVector vector)
vector
- the vector to multiply
public final FXVector mult(float xFX, float yFX)
xFX
- x coordinate (FX).yFX
- y coordinate (FX).
public final void mult(float xFX, float yFX, FXVector target)
xFX
- x coordinate (FX).yFX
- y coordinate (FX).target
- the result vector.public final void mult(FXVector vector, FXVector target)
vector
- the vector to multiply.target
- the result vector.public final void invert()
public float normMatFX()
|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |