Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
b2Mat22 Struct Reference

A 2-by-2 matrix. Stored in column-major order. More...

`#include <b2Math.h>`

## Public Member Functions
| b2Mat22 ()
| The default constructor does nothing (for performance). More...
| b2Mat22 (const b2Vec2 &c1, const b2Vec2 &c2)
| Construct this matrix using columns. More...
| b2Mat22 (float32 a11, float32 a12, float32 a21, float32 a22)
| Construct this matrix using scalars. More...
void | Set (const b2Vec2 &c1, const b2Vec2 &c2)
| Initialize this matrix using columns. More...
void | SetIdentity ()
| Set this to the identity matrix. More...
void | SetZero ()
| Set this matrix to all zeros. More...
b2Mat22 | GetInverse () const
b2Vec2 | Solve (const b2Vec2 &b) const

## Public Attributes
b2Vec2 | ex
b2Vec2 | ey

## Detailed Description

A 2-by-2 matrix. Stored in column-major order.

## Constructor & Destructor Documentation

b2Mat22 | ( |  | ) |
| inline

The default constructor does nothing (for performance).

b2Mat22 | ( | const b2Vec2 & | c1,
|  | const b2Vec2 & | c2
| ) |  |
| inline

Construct this matrix using columns.

b2Mat22 | ( | float32 | a11,
|  | float32 | a12,
|  | float32 | a21,
|  | float32 | a22
| ) |  |
| inline

Construct this matrix using scalars.

## Member Function Documentation

b2Mat22 GetInverse | ( |  | ) | const
| inline

void Set | ( | const b2Vec2 & | c1,
|  | const b2Vec2 & | c2
| ) |  |
| inline

Initialize this matrix using columns.

void SetIdentity | ( |  | ) |
| inline

Set this to the identity matrix.

void SetZero | ( |  | ) |
| inline

Set this matrix to all zeros.

b2Vec2 Solve | ( | const b2Vec2 & | b | ) | const
| inline

Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.

## Member Data Documentation

b2Vec2 ex

b2Vec2 ey

The documentation for this struct was generated from the following file:

- Box2D/Common/b2Math.h