Box2D::b2AABB - An axis aligned bounding box.
my $aabb = Box2D::b2AABB->new(); $aabb->lowerBound( Box2D::b2Vec2->new( $x1, $y1 ) ); $aabb->upperBound( Box2D::b2Vec2->new( $x2, $y2 ) ); $aabb->Combine( $aabb1, $aabb2 ); my $center = $aabb->GetCenter(); my $extents = $aabb->GetExtents(); my $input = Box2D::b2RayCastInput->new(); my $output = Box2D::b2RayCastOutput->new(); $aabb->RayCast( $output, $input );
An axis aligned bounding box.
Default constructor.
Returns a Box2D::b2AABB
Box2D::b2AABB
Combine two AABBs into this one.
Parameters:
Box2D::b2AABB $aabb1
$aabb1
Box2D::b2AABB $aabb2
$aabb2
Does this aabb contain the provided AABB.
Box2D::b2AABB $aabb
$aabb
Returns a bool
bool
Get the center of the AABB.
Returns a Box2D::b2Vec2
Box2D::b2Vec2
Get the extents of the AABB (half-widths).
Verify that the bounds are sorted.
Box2D::b2RayCastOutput $output
Box2D::b2RayCastOutput
$output
Box2D::b2RayCastInput $input
Box2D::b2RayCastInput
$input
the lower vertex
Box2D::b2Vec2 $lowerBound (optional)
$lowerBound
the upper vertex
Box2D::b2Vec2 $upperBound (optional)
$upperBound
Box2D
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.