UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
circle.h
Go to the documentation of this file.
1 #ifndef PYRAMIDWORKS_GEOMETRY_CIRCLE_H_
2 #define PYRAMIDWORKS_GEOMETRY_CIRCLE_H_
3 
5 
6 namespace pyramidworks {
7 namespace geometry {
8 
11 class Circle : public GeometricShape {
12  public:
14  Circle(double _radius) : GeometricShape(), radius_(_radius) {}
15 
17 
18  double radius() const { return radius_; }
19 
21 
22  void set_radius(double _radius) { radius_ = _radius; }
23 
24  bool Intersects(const ugdk::Vector2D& this_pos, const GeometricShape *obj, const ugdk::Vector2D& that_pos) const;
25  bool Intersects(const ugdk::Vector2D& this_pos, const Rect *obj, const ugdk::Vector2D& that_pos) const;
26  bool Intersects(const ugdk::Vector2D& this_pos, const Circle *obj, const ugdk::Vector2D& that_pos) const;
27  bool Intersects(const ugdk::Vector2D& this_pos, const ConvexPolygon *obj, const ugdk::Vector2D& that_pos) const;
29 
30  private:
31  double radius_;
32 };
33 
34 } // namespace geometry
35 } // namespace pyramidworks
36 
37 #endif /* PYRAMIDWORKS_GEOMETRY_CIRCLE_H_ */