UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pyramidworks::geometry::Circle Class Reference

#include "pyramidworks/geometry/circle.h"

Inheritance diagram for pyramidworks::geometry::Circle:
Collaboration diagram for pyramidworks::geometry::Circle:

Public Member Functions

 Circle (double _radius)
 
double radius () const
 Getter for the radius.
 
void set_radius (double _radius)
 Setter the radius.
 
bool Intersects (const ugdk::Vector2D &this_pos, const GeometricShape *obj, const ugdk::Vector2D &that_pos) const
 Checks if this shape intersects another shape.
 
bool Intersects (const ugdk::Vector2D &this_pos, const Rect *obj, const ugdk::Vector2D &that_pos) const
 Checks if there's an intersection with a Rect.
 
bool Intersects (const ugdk::Vector2D &this_pos, const Circle *obj, const ugdk::Vector2D &that_pos) const
 Checks if there's an intersection with a Circle.
 
bool Intersects (const ugdk::Vector2D &this_pos, const ConvexPolygon *obj, const ugdk::Vector2D &that_pos) const
 Checks if there's an intersection with a Convex Polygon.
 
ugdk::ikdtree::Box< 2 > GetBoundingBox (const ugdk::Vector2D &position) const
 Returns a bounding box for this shape.
 
- Public Member Functions inherited from pyramidworks::geometry::GeometricShape
virtual ~GeometricShape ()
 

Additional Inherited Members

- Protected Member Functions inherited from pyramidworks::geometry::GeometricShape
 GeometricShape ()
 

Detailed Description

A circle, one type of GeometricShape.

Constructor & Destructor Documentation

pyramidworks::geometry::Circle::Circle ( double  _radius)
inline
Parameters
radiusThe circle radius.

Member Function Documentation

ugdk::ikdtree::Box< 2 > pyramidworks::geometry::Circle::GetBoundingBox ( const ugdk::Vector2D position) const
virtual

Returns a bounding box for this shape.

The box is at the shape's position and offset

Parameters
positionThe absolute position for this shape.
Returns
A 2D Box around this shape

Implements pyramidworks::geometry::GeometricShape.

bool pyramidworks::geometry::Circle::Intersects ( const ugdk::Vector2D this_pos,
const GeometricShape obj,
const ugdk::Vector2D that_pos 
) const
virtual

Checks if this shape intersects another shape.

Parameters
this_posThe absolute position for this shape.
objThe shape to compare with.
that_posThe absolute position of the other shape.
Returns
True if there's an intersection.

Implements pyramidworks::geometry::GeometricShape.

bool pyramidworks::geometry::Circle::Intersects ( const ugdk::Vector2D this_pos,
const Rect obj,
const ugdk::Vector2D that_pos 
) const
virtual

Checks if there's an intersection with a Rect.

Parameters
this_posThe absolute position for this shape.
objThe shape to compare with.
that_posThe absolute position of the other shape.
Returns
True if there's an intersection.

Implements pyramidworks::geometry::GeometricShape.

bool pyramidworks::geometry::Circle::Intersects ( const ugdk::Vector2D this_pos,
const Circle obj,
const ugdk::Vector2D that_pos 
) const
virtual

Checks if there's an intersection with a Circle.

Parameters
this_posThe absolute position for this shape.
objThe shape to compare with.
that_posThe absolute position of the other shape.
Returns
True if there's an intersection.

Implements pyramidworks::geometry::GeometricShape.

bool pyramidworks::geometry::Circle::Intersects ( const ugdk::Vector2D this_pos,
const ConvexPolygon obj,
const ugdk::Vector2D that_pos 
) const
virtual

Checks if there's an intersection with a Convex Polygon.

Parameters
this_posThe absolute position for this shape.
objThe shape to compare with.
that_posThe absolute position of the other shape.
Returns
True if there's an intersection.

Implements pyramidworks::geometry::GeometricShape.

double pyramidworks::geometry::Circle::radius ( ) const
inline

Getter for the radius.

Returns
A double.
void pyramidworks::geometry::Circle::set_radius ( double  _radius)
inline

Setter the radius.

Parameters
radiusThe new radius.

The documentation for this class was generated from the following files: