Zach Morgan > Collision-2D-0.07 > Collision::2D::Entity::Circle

Download:
Collision-2D-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Collision::2D::Entity::Circle - A circle entity.

DESCRIPTION ^

This is an entity with a radius. Attributes x and y point to the center of the circle.

ATTRIBUTES ^

radius

Each point on the circle is this distance from the center, at ($circ->x, $circ->y)

METHODS ^

Anything in Collision::2D::Entity.

collide

See Collision::2D::Entity->collide

 print 'boom' if $circle->collide($rect);
 print 'zing' if $circle->collide($circle);
 print 'yotz' if $circle->collide($grid);

intersect

See Collision::2D::Entity->intersect

 print 'bam' if $circle->intersect($rect);
 # etc..
syntax highlighting: