UGDK
0.5.0
|
#include "pyramidworks/geometry/geometricshape.h"
Public Member Functions | |
virtual | ~GeometricShape () |
virtual bool | Intersects (const ugdk::math::Vector2D &this_pos, const GeometricShape *obj, const ugdk::math::Vector2D &that_pos) const =0 |
Checks if this shape intersects another shape. More... | |
virtual bool | Intersects (const ugdk::math::Vector2D &this_pos, const Circle *obj, const ugdk::math::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Circle. More... | |
virtual bool | Intersects (const ugdk::math::Vector2D &this_pos, const Rect *obj, const ugdk::math::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Rect. More... | |
virtual bool | Intersects (const ugdk::math::Vector2D &this_pos, const ConvexPolygon *obj, const ugdk::math::Vector2D &that_pos) const =0 |
Checks if there's an intersection with a Convex Polygon. More... | |
virtual ugdk::structure::Box< 2 > | GetBoundingBox (const ugdk::math::Vector2D &position) const =0 |
Returns a bounding box for this shape. More... | |
Protected Member Functions | |
GeometricShape () | |
A geometric shape.
|
inlinevirtual |
|
inlineprotected |
offset | An offset to the position. Defaults to (0,0) |
|
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.
|
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.
|
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.
|
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.
|
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.