UGDK
|
#include <pyramidworks/geometry/geometricshape.h>
Public Member Functions | |
virtual | ~GeometricShape () |
virtual bool | Intersects (const ugdk::Vector2D &this_pos, const GeometricShape *obj, const ugdk::Vector2D &that_pos) const =0 |
Checks if this shape intersects another shape. | |
virtual bool | Intersects (const ugdk::Vector2D &this_pos, const Circle *obj, const ugdk::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Circle. | |
virtual bool | Intersects (const ugdk::Vector2D &this_pos, const Rect *obj, const ugdk::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Rect. | |
virtual bool | Intersects (const ugdk::Vector2D &this_pos, const ConvexPolygon *obj, const ugdk::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Convex Polygon. | |
virtual ugdk::ikdtree::Box< 2 > | GetBoundingBox (const ugdk::Vector2D &position) const =0 |
Returns a bounding box for this shape. | |
Protected Member Functions | |
GeometricShape () |
A geometric shape.
virtual pyramidworks::geometry::GeometricShape::~GeometricShape | ( | ) | [inline, virtual] |
pyramidworks::geometry::GeometricShape::GeometricShape | ( | ) | [inline, protected] |
offset | An offset to the position. Defaults to (0,0) |
virtual ugdk::ikdtree::Box<2> pyramidworks::geometry::GeometricShape::GetBoundingBox | ( | const ugdk::Vector2D & | position | ) | const [pure virtual] |
Returns a bounding box for this shape.
The box is at the shape's position and offset
position | The absolute position for this shape. |
Implemented in pyramidworks::geometry::Rect, pyramidworks::geometry::Circle, and pyramidworks::geometry::ConvexPolygon.
virtual bool pyramidworks::geometry::GeometricShape::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const GeometricShape * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [pure virtual] |
Checks if this shape intersects another shape.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implemented in pyramidworks::geometry::Rect, pyramidworks::geometry::Circle, and pyramidworks::geometry::ConvexPolygon.
virtual bool pyramidworks::geometry::GeometricShape::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const Circle * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [pure virtual] |
Checks if there's an intersection with a Circle.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implemented in pyramidworks::geometry::Rect, pyramidworks::geometry::Circle, and pyramidworks::geometry::ConvexPolygon.
virtual bool pyramidworks::geometry::GeometricShape::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const Rect * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [pure virtual] |
Checks if there's an intersection with a Rect.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implemented in pyramidworks::geometry::Rect, pyramidworks::geometry::Circle, and pyramidworks::geometry::ConvexPolygon.
virtual bool pyramidworks::geometry::GeometricShape::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const ConvexPolygon * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [pure virtual] |
Checks if there's an intersection with a Convex Polygon.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implemented in pyramidworks::geometry::Rect, pyramidworks::geometry::Circle, and pyramidworks::geometry::ConvexPolygon.