b2Mat22 Struct Reference
A 2-by-2 matrix. Stored in column-major order. More...
Public Member Functions | |
b2Mat22 () | |
The default constructor does nothing (for performance). | |
b2Mat22 (const b2Vec2 &c1, const b2Vec2 &c2) | |
Construct this matrix using columns. | |
b2Mat22 (float32 a11, float32 a12, float32 a21, float32 a22) | |
Construct this matrix using scalars. | |
b2Mat22 (float32 angle) | |
Construct this matrix using an angle. | |
void | Set (const b2Vec2 &c1, const b2Vec2 &c2) |
Initialize this matrix using columns. | |
void | Set (float32 angle) |
Initialize this matrix using an angle. | |
void | SetIdentity () |
Set this to the identity matrix. | |
void | SetZero () |
Set this matrix to all zeros. | |
float32 | GetAngle () const |
Extract the angle from this matrix (assumed to be a rotation matrix). | |
b2Vec2 | Solve (const b2Vec2 &b) const |
Solve A * x = b, where b is a column vector. |
Detailed Description
A 2-by-2 matrix. Stored in column-major order.Constructor & Destructor Documentation
b2Mat22::b2Mat22 | ( | float32 | angle | ) | [inline, explicit] |
Construct this matrix using an angle.
This matrix becomes an orthonormal rotation matrix.
Member Function Documentation
void b2Mat22::Set | ( | float32 | angle | ) | [inline] |
Initialize this matrix using an angle.
This matrix becomes an orthonormal rotation matrix.
float32 b2Mat22::GetAngle | ( | ) | const [inline] |
Extract the angle from this matrix (assumed to be a rotation matrix).
Solve A * x = b, where b is a column vector.
This is more efficient than computing the inverse in one-shot cases.
The documentation for this struct was generated from the following file:
- b2Math.h
Generated on Sun Apr 13 15:21:27 2008 for Box2D by 1.5.4