NAME
Box2D::b2Transform - Contains translation and rotation.
SYNOPSIS
my $transform = Box2D::b2Transform->new( $postiion, $rotation );
DESCRIPTION
A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames.
METHODS
new( $position, $R )
Initialize using a position vector and a rotation matrix.
Parameters:
Box2D::b2Vec2
$position
Box2D::b2Mat22
$R
Returns a Box2D::b2Transform
GetAngle()
Calculate the angle that the rotation matrix represents.
Returns a float32
Set( $p, $angle )
Set this based on the position and angle.
Parameters:
Box2D::b2Vec2
$p
float32
$angle
SetIdentity()
Set this to the identity transform.
position()
position( $position )
Parameters:
Box2D::b2Vec2
$position
(optional)
Returns a Box2D::b2Vec2
R()
R( $rotation )
Parameters:
Box2D::b2Mat22
$rotation
(optional) - rotation matrix
Returns a Box2D::b2Mat22
SEE ALSO
BUGS
See "BUGS" in Box2D