Jeffrey T. Palmer > Box2D > Box2D::b2PolygonShape

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Box2D::b2PolygonShape - A convex polygon.

SYNOPSIS ^

  my $rect = Box2D::b2PolygonShape->new();
  $rect->SetAsBox( $hx, $hy );

DESCRIPTION ^

A convex polygon. It is assumed that the interior of the polygon is to the left of each edge.

METHODS ^

new()

Default constructor.

Returns a Box2D::b2PolygonShape

GetVertex( $index )

Get a vertex by index.

Parameters:

Returns a Box2D::b2Vec2

GetVertexCount()

Get the vertex count.

Returns a int32

Set( @vertices )

Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.

Parameters:

SetAsBox( $hx, $hy )

SetAsBox( $hx, $hy, $center, $angle )

Build vertices to represent an oriented box.

Parameters:

SetAsEdge( $v1, $v2 )

Set this as a single edge.

Parameters:

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: