|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbox2d.common.Mat22
public class Mat22
A 2x2 matrix class. djm: added ToOut methods
Field Summary | |
---|---|
Vec2 |
col1
|
Vec2 |
col2
|
Constructor Summary | |
---|---|
Mat22()
Construct zero matrix. |
|
Mat22(float angle)
Create a matrix representing a rotation. |
|
Mat22(float col1x,
float col2x,
float col1y,
float col2y)
Create a matrix from four floats. |
|
Mat22(Vec2 c1,
Vec2 c2)
Create a matrix with given vectors as columns. |
Method Summary | |
---|---|
Mat22 |
abs()
Return the matrix composed of the absolute values of all elements. |
static Mat22 |
abs(Mat22 R)
Return the matrix composed of the absolute values of all elements. |
void |
absLocal()
|
static void |
absToOut(Mat22 R,
Mat22 out)
|
Mat22 |
add(Mat22 B)
Add this matrix to B, return the result. |
Mat22 |
addLocal(Mat22 B)
Add B to this matrix locally. |
Mat22 |
clone()
Return a clone of this matrix. |
Mat22 |
invert()
Returns the inverted Mat22 - does NOT invert the matrix locally! |
Mat22 |
invertLocal()
|
void |
invertToOut(Mat22 out)
|
Mat22 |
mul(Mat22 R)
Multiply another matrix by this one (this one on left). |
static Mat22 |
mul(Mat22 A,
Mat22 B)
|
static Vec2 |
mul(Mat22 R,
Vec2 v)
|
Vec2 |
mul(Vec2 v)
Multiply a vector by this matrix. |
void |
mulToOut(Mat22 R,
Mat22 out)
|
static void |
mulToOut(Mat22 A,
Mat22 B,
Mat22 out)
|
static void |
mulToOut(Mat22 R,
Vec2 v,
Vec2 out)
|
void |
mulToOut(Vec2 v,
Vec2 out)
|
Mat22 |
mulTrans(Mat22 B)
Multiply another matrix by the transpose of this one (transpose of this one on left). |
static Mat22 |
mulTrans(Mat22 A,
Mat22 B)
|
static Vec2 |
mulTrans(Mat22 R,
Vec2 v)
|
Vec2 |
mulTrans(Vec2 v)
Multiply a vector by the transpose of this matrix. |
void |
mulTransToOut(Mat22 B,
Mat22 out)
|
static void |
mulTransToOut(Mat22 A,
Mat22 B,
Mat22 out)
|
static void |
mulTransToOut(Mat22 R,
Vec2 v,
Vec2 out)
|
void |
mulTransToOut(Vec2 v,
Vec2 out)
|
void |
set(float angle)
Set as a matrix representing a rotation. |
void |
set(float col1x,
float col2x,
float col1y,
float col2y)
|
void |
set(Mat22 m)
Set as a copy of another matrix. |
void |
set(Vec2 c1,
Vec2 c2)
Set by column vectors. |
void |
setAngle(float angle)
Set as a matrix representing a rotation. |
void |
setIdentity()
Set as the identity matrix. |
void |
setZero()
Set as the zero matrix. |
Vec2 |
solve(Vec2 b)
Solve A * x = b where A = this matrix. |
void |
solveToOut(Vec2 b,
Vec2 out)
|
String |
toString()
Convert the matrix to printable format. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Vec2 col1
public Vec2 col2
Constructor Detail |
---|
public Mat22()
public Mat22(float angle)
angle
- Rotation (in radians) that matrix represents.public Mat22(Vec2 c1, Vec2 c2)
c1
- Column 1 of matrixc2
- Column 2 of matrixpublic Mat22(float col1x, float col2x, float col1y, float col2y)
col1x
- col2x
- col1y
- col2y
- Method Detail |
---|
public String toString()
toString
in class Object
public final void set(Mat22 m)
m
- Matrix to copypublic final void set(float col1x, float col2x, float col1y, float col2y)
public final Mat22 clone()
clone
in class Object
public final void set(float angle)
angle
- Rotation (in radians) that matrix represents.public final void setIdentity()
public final void setZero()
public final void setAngle(float angle)
angle
- Rotation (in radians) that matrix represents.public final void set(Vec2 c1, Vec2 c2)
c1
- Column 1c2
- Column 2public final Mat22 invert()
public final Mat22 invertLocal()
public final void invertToOut(Mat22 out)
public final Mat22 abs()
public final void absLocal()
public static final Mat22 abs(Mat22 R)
public static void absToOut(Mat22 R, Mat22 out)
public final Vec2 mul(Vec2 v)
v
- Vector to multiply by matrix.
public final void mulToOut(Vec2 v, Vec2 out)
public final Mat22 mul(Mat22 R)
R
-
public final void mulToOut(Mat22 R, Mat22 out)
public final Mat22 mulTrans(Mat22 B)
B
-
public final void mulTransToOut(Mat22 B, Mat22 out)
public final Vec2 mulTrans(Vec2 v)
v
-
public final void mulTransToOut(Vec2 v, Vec2 out)
public final Mat22 add(Mat22 B)
B
-
public final Mat22 addLocal(Mat22 B)
B
-
public final Vec2 solve(Vec2 b)
public final void solveToOut(Vec2 b, Vec2 out)
public static final Vec2 mul(Mat22 R, Vec2 v)
public static final void mulToOut(Mat22 R, Vec2 v, Vec2 out)
public static final Mat22 mul(Mat22 A, Mat22 B)
public static final void mulToOut(Mat22 A, Mat22 B, Mat22 out)
public static final Vec2 mulTrans(Mat22 R, Vec2 v)
public static final void mulTransToOut(Mat22 R, Vec2 v, Vec2 out)
public static final Mat22 mulTrans(Mat22 A, Mat22 B)
public static final void mulTransToOut(Mat22 A, Mat22 B, Mat22 out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |