UGDK
|
00001 #ifndef PYRAMIDWORKS_GEOMETRY_GEOMETRYOBJECT_H_ 00002 #define PYRAMIDWORKS_GEOMETRY_GEOMETRYOBJECT_H_ 00003 00004 #include <ugdk/math/vector2D.h> 00005 #include <ugdk/util.h> 00006 #include <pyramidworks/geometry.h> 00007 00008 namespace pyramidworks { 00009 namespace geometry { 00010 00013 class GeometricShape { 00014 public: 00015 virtual ~GeometricShape() {} 00016 00018 00022 virtual bool Intersects(const ugdk::Vector2D& this_pos, const GeometricShape *obj, const ugdk::Vector2D& that_pos) const = 0; 00023 00025 00029 virtual bool Intersects(const ugdk::Vector2D& this_pos, const Circle *obj, const ugdk::Vector2D& that_pos) const = 0; 00030 00032 00036 virtual bool Intersects(const ugdk::Vector2D& this_pos, const Rect *obj, const ugdk::Vector2D& that_pos) const = 0; 00037 00039 00043 virtual bool Intersects(const ugdk::Vector2D& this_pos, const ConvexPolygon *obj, const ugdk::Vector2D& that_pos) const = 0; 00044 00046 00049 virtual ugdk::ikdtree::Box<2> GetBoundingBox(const ugdk::Vector2D& position) const = 0; 00050 00051 protected: 00053 GeometricShape() {} 00054 }; 00055 00056 } // namespace geometry 00057 } // namespace pyramidworks 00058 00059 #endif /* PYRAMIDWORKS_GEOMETRY_GEOMETRYOBJECT_H_ */