PackageBox2D.Common.Math
Classpublic class b2Transform
Sourceb2Transform.as

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



Public Properties
 PropertyDefined by
  position : b2Vec2
b2Transform
  R : b2Mat22
b2Transform
Public Methods
 MethodDefined by
  
b2Transform(pos:b2Vec2 = null, r:b2Mat22 = null)
The default constructor does nothing (for performance).
b2Transform
  
GetAngle():Number
Calculate the angle that the rotation matrix represents.
b2Transform
  
Initialize(pos:b2Vec2, r:b2Mat22):void
Initialize using a position vector and a rotation matrix.
b2Transform
  
Set(x:b2Transform):void
b2Transform
  
SetIdentity():void
Set this to the identity transform.
b2Transform
Property detail
positionproperty
public var position:b2Vec2
Rproperty 
public var R:b2Mat22
Constructor detail
b2Transform()constructor
public function b2Transform(pos:b2Vec2 = null, r:b2Mat22 = null)

The default constructor does nothing (for performance).

Parameters
pos:b2Vec2 (default = null)
 
r:b2Mat22 (default = null)
Method detail
GetAngle()method
public function GetAngle():Number

Calculate the angle that the rotation matrix represents.

Returns
Number
Initialize()method 
public function Initialize(pos:b2Vec2, r:b2Mat22):void

Initialize using a position vector and a rotation matrix.

Parameters
pos:b2Vec2
 
r:b2Mat22
Set()method 
public function Set(x:b2Transform):voidParameters
x:b2Transform
SetIdentity()method 
public function SetIdentity():void

Set this to the identity transform.