Class b2Transform

A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames.

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(pos: b2Vec2, r: b2Mat22): b2Transform

The default constructor does nothing (for performance).

Parameters

Returns

b2Transform

Properties

public R: b2Mat22

Transform rotation.

public position: b2Vec2

Transform position.

Methods

public GetAngle(): number

Calculate the angle that the rotation matrix represents.

Returns

number

Rotation matrix angle.

public Initialize(pos: b2Vec2, r: b2Mat22)

Initialize using a position vector and rotation matrix.

Parameters

public Set(x: b2Transform)

Sets the transfrom from a transfrom.

Parameters

public SetIdentity()

Set this to the identity transform.