Circle2D.hpp
Go to the documentation of this file.
1 // This is -*-c++-*-
2 //
3 
4 #ifndef CIRCLE2D_H
5 #define CIRCLE2D_H
6 
7 #include "Ellipse2D.hpp"
8 
9 // ////////////////////////////////////////////////////////////
10 
11 namespace datatypes
12 {
13 
14 
16 
21 class Circle2D : public Ellipse2D
22 {
23 public:
26 
28  Circle2D();
29 
31 
37  Circle2D(const Point2D& center, value_type radius);
38 
40 
54  Circle2D(value_type x_center, value_type y_center, value_type radius);
55 
56  // Estimate the memory usage of this object
57  virtual const UINT32 getUsedMemory() const { return sizeof(*this); };
58 
60  value_type getRadius() const { return m_radius.getX(); }
61 
63  void setRadius(value_type radius);
64 
66 
69  bool containsPoint(const Point2D& point) const;
70 
71 };
72 
73 
74 } // namespace datatypes
75 
76 #endif // CIRCLE2D_HPP
Point2D::value_type value_type
The type of the stored x, y coordinates, and the rotation.
Definition: Ellipse2D.hpp:34
value_type getRadius() const
Returns the radius of this circle.
Definition: Circle2D.hpp:60
value_type getX() const
Definition: Point2D.hpp:70
virtual const UINT32 getUsedMemory() const
Definition: Circle2D.hpp:57
uint32_t UINT32
Ellipse2D base_class
Base class.
Definition: Circle2D.hpp:25
A rotated 2-dimensional ellipse in the plane.
Definition: Ellipse2D.hpp:30
Circle2D()
Constructor for an all-zero Circle2D.
Definition: Circle2D.cpp:14
A circle in the plane.
Definition: Circle2D.hpp:21
bool containsPoint(const Point2D &point) const
Returns true if the given Point2D is inside this ellipse or on its outline.
Definition: Circle2D.cpp:37
void setRadius(value_type radius)
Sets the radius of this circle. Must be non-negative.
Definition: Circle2D.cpp:32


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Mon Oct 26 2020 03:27:29