C# Class Box2D.Common.Mat22

Show file Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
Ex Vec2
Ey Vec2

Public Methods

Method Description
Abs ( ) : Mat22

Return the matrix composed of the absolute values of all elements. djm: fixed double allocation

Abs ( Mat22 r ) : Mat22

Return the matrix composed of the absolute values of all elements.

AbsLocal ( ) : void
AbsToOut ( Mat22 r, Mat22 result ) : void
Add ( Mat22 b ) : Mat22

Add this matrix to B, return the result.

AddLocal ( Mat22 b ) : Mat22

Add B to this matrix locally.

Clone ( ) : Mat22

Return a clone of this matrix. djm fixed double allocation

CreateRotationalTransform ( float angle ) : Mat22
CreateRotationalTransform ( float angle, Mat22 result ) : void
CreateScaleTransform ( float scale ) : Mat22
CreateScaleTransform ( float scale, Mat22 result ) : void
Equals ( Object obj ) : bool
GetHashCode ( ) : int
Invert ( ) : Mat22

Returns the inverted Mat22 - does NOT invert the matrix locally!

InvertLocal ( ) : Mat22
InvertToOut ( Mat22 result ) : void
Mat22 ( ) : System

Construct zero matrix. Note: this is NOT an identity matrix! djm fixed double allocation problem

Mat22 ( Vec2 c1, Vec2 c2 ) : System

Create a matrix with given vectors as columns.

Mat22 ( float exx, float col2x, float exy, float col2y ) : System

Create a matrix from four floats.

Mul ( Mat22 r ) : Mat22

Multiply another matrix by this one (this one on left). djm optimized

Mul ( Mat22 a, Mat22 b ) : Mat22
Mul ( Mat22 r, Vec2 v ) : Vec2
Mul ( Vec2 v ) : Vec2

Multiply a vector by this matrix.

MulLocal ( Mat22 R ) : Mat22
MulToOut ( Mat22 r, Mat22 result ) : void
MulToOut ( Mat22 a, Mat22 b, Mat22 result ) : void
MulToOut ( Mat22 r, Vec2 v, Vec2 result ) : void
MulToOut ( Vec2 v, Vec2 result ) : void
MulToOutUnsafe ( Mat22 r, Mat22 result ) : void
MulToOutUnsafe ( Mat22 a, Mat22 b, Mat22 result ) : void
MulToOutUnsafe ( Mat22 r, Vec2 v, Vec2 result ) : void
MulToOutUnsafe ( Vec2 v, Vec2 result ) : void
MulTrans ( Mat22 b ) : Mat22

Multiply another matrix by the transpose of this one (transpose of this one on left). djm: optimized

MulTrans ( Mat22 a, Mat22 b ) : Mat22
MulTrans ( Mat22 r, Vec2 v ) : Vec2
MulTrans ( Vec2 v ) : Vec2

Multiply a vector by the transpose of this matrix.

MulTransLocal ( Mat22 b ) : Mat22
MulTransToOut ( Mat22 b, Mat22 result ) : void
MulTransToOut ( Mat22 a, Mat22 b, Mat22 result ) : void
MulTransToOut ( Mat22 r, Vec2 v, Vec2 result ) : void
MulTransToOut ( Vec2 v, Vec2 result ) : void
MulTransToOutUnsafe ( Mat22 b, Mat22 result ) : void
MulTransToOutUnsafe ( Mat22 a, Mat22 b, Mat22 result ) : void
MulTransToOutUnsafe ( Mat22 r, Vec2 v, Vec2 result ) : void
Set ( Mat22 m ) : Mat22

Set as a copy of another matrix.

Set ( float exx, float col2x, float exy, float col2y ) : Mat22
Set ( Vec2 c1, Vec2 c2 ) : void

Set by column vectors.

Set ( float angle ) : void

Set as a matrix representing a rotation.

SetIdentity ( ) : void

Set as the identity matrix.

SetZero ( ) : void

Set as the zero matrix.

Solve ( Vec2 b ) : Vec2

Solve A * x = b where A = this matrix.

SolveToOut ( Vec2 b, Vec2 result ) : void
ToString ( ) : String

Convert the matrix to printable format.

Method Details

Abs() public method

Return the matrix composed of the absolute values of all elements. djm: fixed double allocation
public Abs ( ) : Mat22
return Mat22

Abs() public static method

Return the matrix composed of the absolute values of all elements.
public static Abs ( Mat22 r ) : Mat22
r Mat22
return Mat22

AbsLocal() public method

public AbsLocal ( ) : void
return void

AbsToOut() public static method

public static AbsToOut ( Mat22 r, Mat22 result ) : void
r Mat22
result Mat22
return void

Add() public method

Add this matrix to B, return the result.
public Add ( Mat22 b ) : Mat22
b Mat22
return Mat22

AddLocal() public method

Add B to this matrix locally.
public AddLocal ( Mat22 b ) : Mat22
b Mat22
return Mat22

Clone() public method

Return a clone of this matrix. djm fixed double allocation
public Clone ( ) : Mat22
return Mat22

CreateRotationalTransform() public static method

public static CreateRotationalTransform ( float angle ) : Mat22
angle float
return Mat22

CreateRotationalTransform() public static method

public static CreateRotationalTransform ( float angle, Mat22 result ) : void
angle float
result Mat22
return void

CreateScaleTransform() public static method

public static CreateScaleTransform ( float scale ) : Mat22
scale float
return Mat22

CreateScaleTransform() public static method

public static CreateScaleTransform ( float scale, Mat22 result ) : void
scale float
result Mat22
return void

Equals() public method

public Equals ( Object obj ) : bool
obj Object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Invert() public method

Returns the inverted Mat22 - does NOT invert the matrix locally!
public Invert ( ) : Mat22
return Mat22

InvertLocal() public method

public InvertLocal ( ) : Mat22
return Mat22

InvertToOut() public method

public InvertToOut ( Mat22 result ) : void
result Mat22
return void

Mat22() public method

Construct zero matrix. Note: this is NOT an identity matrix! djm fixed double allocation problem
public Mat22 ( ) : System
return System

Mat22() public method

Create a matrix with given vectors as columns.
public Mat22 ( Vec2 c1, Vec2 c2 ) : System
c1 Vec2 Column 1 of matrix
c2 Vec2 Column 2 of matrix
return System

Mat22() public method

Create a matrix from four floats.
public Mat22 ( float exx, float col2x, float exy, float col2y ) : System
exx float
col2x float
exy float
col2y float
return System

Mul() public method

Multiply another matrix by this one (this one on left). djm optimized
public Mul ( Mat22 r ) : Mat22
r Mat22
return Mat22

Mul() public static method

public static Mul ( Mat22 a, Mat22 b ) : Mat22
a Mat22
b Mat22
return Mat22

Mul() public static method

public static Mul ( Mat22 r, Vec2 v ) : Vec2
r Mat22
v Vec2
return Vec2

Mul() public method

Multiply a vector by this matrix.
public Mul ( Vec2 v ) : Vec2
v Vec2 Vector to multiply by matrix.
return Vec2

MulLocal() public method

public MulLocal ( Mat22 R ) : Mat22
R Mat22
return Mat22

MulToOut() public method

public MulToOut ( Mat22 r, Mat22 result ) : void
r Mat22
result Mat22
return void

MulToOut() public static method

public static MulToOut ( Mat22 a, Mat22 b, Mat22 result ) : void
a Mat22
b Mat22
result Mat22
return void

MulToOut() public static method

public static MulToOut ( Mat22 r, Vec2 v, Vec2 result ) : void
r Mat22
v Vec2
result Vec2
return void

MulToOut() public method

public MulToOut ( Vec2 v, Vec2 result ) : void
v Vec2
result Vec2
return void

MulToOutUnsafe() public method

public MulToOutUnsafe ( Mat22 r, Mat22 result ) : void
r Mat22
result Mat22
return void

MulToOutUnsafe() public static method

public static MulToOutUnsafe ( Mat22 a, Mat22 b, Mat22 result ) : void
a Mat22
b Mat22
result Mat22
return void

MulToOutUnsafe() public static method

public static MulToOutUnsafe ( Mat22 r, Vec2 v, Vec2 result ) : void
r Mat22
v Vec2
result Vec2
return void

MulToOutUnsafe() public method

public MulToOutUnsafe ( Vec2 v, Vec2 result ) : void
v Vec2
result Vec2
return void

MulTrans() public method

Multiply another matrix by the transpose of this one (transpose of this one on left). djm: optimized
public MulTrans ( Mat22 b ) : Mat22
b Mat22
return Mat22

MulTrans() public static method

public static MulTrans ( Mat22 a, Mat22 b ) : Mat22
a Mat22
b Mat22
return Mat22

MulTrans() public static method

public static MulTrans ( Mat22 r, Vec2 v ) : Vec2
r Mat22
v Vec2
return Vec2

MulTrans() public method

Multiply a vector by the transpose of this matrix.
public MulTrans ( Vec2 v ) : Vec2
v Vec2
return Vec2

MulTransLocal() public method

public MulTransLocal ( Mat22 b ) : Mat22
b Mat22
return Mat22

MulTransToOut() public method

public MulTransToOut ( Mat22 b, Mat22 result ) : void
b Mat22
result Mat22
return void

MulTransToOut() public static method

public static MulTransToOut ( Mat22 a, Mat22 b, Mat22 result ) : void
a Mat22
b Mat22
result Mat22
return void

MulTransToOut() public static method

public static MulTransToOut ( Mat22 r, Vec2 v, Vec2 result ) : void
r Mat22
v Vec2
result Vec2
return void

MulTransToOut() public method

public MulTransToOut ( Vec2 v, Vec2 result ) : void
v Vec2
result Vec2
return void

MulTransToOutUnsafe() public method

public MulTransToOutUnsafe ( Mat22 b, Mat22 result ) : void
b Mat22
result Mat22
return void

MulTransToOutUnsafe() public static method

public static MulTransToOutUnsafe ( Mat22 a, Mat22 b, Mat22 result ) : void
a Mat22
b Mat22
result Mat22
return void

MulTransToOutUnsafe() public static method

public static MulTransToOutUnsafe ( Mat22 r, Vec2 v, Vec2 result ) : void
r Mat22
v Vec2
result Vec2
return void

Set() public method

Set as a copy of another matrix.
public Set ( Mat22 m ) : Mat22
m Mat22 Matrix to copy
return Mat22

Set() public method

public Set ( float exx, float col2x, float exy, float col2y ) : Mat22
exx float
col2x float
exy float
col2y float
return Mat22

Set() public method

Set by column vectors.
public Set ( Vec2 c1, Vec2 c2 ) : void
c1 Vec2 Column 1
c2 Vec2 Column 2
return void

Set() public method

Set as a matrix representing a rotation.
public Set ( float angle ) : void
angle float Rotation (in radians) that matrix represents.
return void

SetIdentity() public method

Set as the identity matrix.
public SetIdentity ( ) : void
return void

SetZero() public method

Set as the zero matrix.
public SetZero ( ) : void
return void

Solve() public method

Solve A * x = b where A = this matrix.
public Solve ( Vec2 b ) : Vec2
b Vec2
return Vec2

SolveToOut() public method

public SolveToOut ( Vec2 b, Vec2 result ) : void
b Vec2
result Vec2
return void

ToString() public method

Convert the matrix to printable format.
public ToString ( ) : String
return String

Property Details

Ex public property

public Vec2,Box2D.Common Ex
return Vec2

Ey public property

public Vec2,Box2D.Common Ey
return Vec2