Package pybox2d :: Module Box2D :: Class b2Mat22
[hide private]
[frames] | no frames]

type b2Mat22

source code


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

Instance Methods [hide private]
b2Mat22
__init__(self)
__init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22 __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22 __init__(self, float32 angle) -> b2Mat22
source code
 
__repr__(self) source code
 
__getstate__(self, additional_ignore=[])
Returns a dictionary representation of self, with dict(var=value [, ...])
source code
 
__setstate__(self, dict)
Takes each variable=value pair in the dictionary and sets the attributes based on them
source code
 
__swig_destroy__(...)
delete_b2Mat22(b2Mat22 self)
 
Set(...)
Set(b2Vec2 c1, b2Vec2 c2) b2Mat22_Set(b2Mat22 self, float32 angle)
source code
 
SetIdentity(...)
b2Mat22_SetIdentity(b2Mat22 self)
source code
 
SetZero(...)
b2Mat22_SetZero(b2Mat22 self)
source code
 
GetAngle(...)
b2Mat22_GetAngle(b2Mat22 self) -> float32
source code
 
GetInverse(...)
b2Mat22_GetInverse(b2Mat22 self) -> b2Mat22
source code
 
Solve(...)
b2Mat22_Solve(b2Mat22 self, b2Vec2 b) -> b2Vec2
source code
Properties [hide private]
  thisown
The membership flag
  col1
b2Mat22_col1_get(b2Mat22 self) -> b2Vec2
  col2
b2Mat22_col2_get(b2Mat22 self) -> b2Vec2
Method Details [hide private]

__init__(self)
(Constructor)

source code 

__init__(self, b2Vec2 c1, b2Vec2 c2) -> b2Mat22 __init__(self, float32 a11, float32 a12, float32 a21, float32 a22) -> b2Mat22 __init__(self, float32 angle) -> b2Mat22

Construct this matrix using an angle. This matrix becomes an orthonormal rotation matrix.

Returns: b2Mat22
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

__getstate__(self, additional_ignore=[])

source code 

Returns a dictionary representation of self, with 
 dict(var=value [, ...])

additional_ignore can be specified to ignore certain
properties. 

Set(...)

source code 

Set(b2Vec2 c1, b2Vec2 c2) b2Mat22_Set(b2Mat22 self, float32 angle)

Initialize this matrix using an angle. This matrix becomes an orthonormal rotation matrix.

SetIdentity(...)

source code 

b2Mat22_SetIdentity(b2Mat22 self)

Set this to the identity matrix.

SetZero(...)

source code 

b2Mat22_SetZero(b2Mat22 self)

Set this matrix to all zeros.

GetAngle(...)

source code 

b2Mat22_GetAngle(b2Mat22 self) -> float32

Extract the angle from this matrix (assumed to be a rotation matrix).

Solve(...)

source code 

b2Mat22_Solve(b2Mat22 self, b2Vec2 b) -> b2Vec2

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


Property Details [hide private]

thisown

The membership flag

col1

b2Mat22_col1_get(b2Mat22 self) -> b2Vec2

col2

b2Mat22_col2_get(b2Mat22 self) -> b2Vec2