Box2D::b2PolygonShape - A convex polygon.
my $rect = Box2D::b2PolygonShape->new(); $rect->SetAsBox( $hx, $hy );
A convex polygon. It is assumed that the interior of the polygon is to the left of each edge.
Default constructor.
Returns a Box2D::b2PolygonShape
Box2D::b2PolygonShape
Get a vertex by index.
Parameters:
int32 $index
int32
$index
Returns a Box2D::b2Vec2
Box2D::b2Vec2
Get the vertex count.
Returns a int32
Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.
array @vertices
array
@vertices
Build vertices to represent an oriented box.
float32 $hx - the half-width.
float32
$hx
float32 $hy - the half-height.
$hy
Box2D::b2Vec2 $center (optional) - the center of the box in local coordinates.
$center
float32 $angle (optional) - the rotation of the box in local coordinates.
$angle
Set this as a single edge.
Box2D::b2Vec2 $v1
$v1
Box2D::b2Vec2 $v2
$v2
Box2D
Box2D::b2Shape
See "BUGS" in Box2D
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.