Package org.jbox2d.common
Class Mat33
- java.lang.Object
-
- org.jbox2d.common.Mat33
-
- All Implemented Interfaces:
java.io.Serializable
public class Mat33 extends java.lang.Object implements java.io.Serializable
A 3-by-3 matrix. Stored in column-major order.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
void
getInverse22(Mat33 M)
void
getSymInverse33(Mat33 M)
int
hashCode()
static Vec3
mul(Mat33 A, Vec3 v)
static Vec2
mul22(Mat33 A, Vec2 v)
static void
mul22ToOut(Mat33 A, Vec2 v, Vec2 out)
static void
mul22ToOutUnsafe(Mat33 A, Vec2 v, Vec2 out)
static void
mulToOut(Mat33 A, Vec3 v, Vec3 out)
static void
mulToOutUnsafe(Mat33 A, Vec3 v, Vec3 out)
void
setZero()
Vec2
solve22(Vec2 b)
Solve A * x = b, where b is a column vector.void
solve22ToOut(Vec2 b, Vec2 out)
Solve A * x = b, where b is a column vector.Vec3
solve33(Vec3 b)
Solve A * x = b, where b is a column vector.void
solve33ToOut(Vec3 b, Vec3 out)
Solve A * x = b, where b is a column vector.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
IDENTITY
public static final Mat33 IDENTITY
-
ex
public final Vec3 ex
-
ey
public final Vec3 ey
-
ez
public final Vec3 ez
-
-
Method Detail
-
setZero
public void setZero()
-
solve22
public final Vec2 solve22(Vec2 b)
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.- Parameters:
b
-- Returns:
-
solve22ToOut
public final void solve22ToOut(Vec2 b, Vec2 out)
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.- Parameters:
b
-
-
solve33
public final Vec3 solve33(Vec3 b)
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.- Parameters:
b
-- Returns:
-
solve33ToOut
public final void solve33ToOut(Vec3 b, Vec3 out)
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.- Parameters:
b
-out
- the result
-
getInverse22
public void getInverse22(Mat33 M)
-
getSymInverse33
public void getSymInverse33(Mat33 M)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-