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
datatypes::Circle2D::getUsedMemory
virtual const UINT32 getUsedMemory() const
Definition: Circle2D.hpp:57
datatypes::Point2D
Definition: Point2D.hpp:27
datatypes::Circle2D::setRadius
void setRadius(value_type radius)
Sets the radius of this circle. Must be non-negative.
Definition: Circle2D.cpp:32
datatypes::Point2D::getX
value_type getX() const
Definition: Point2D.hpp:70
datatypes::Circle2D::Circle2D
Circle2D()
Constructor for an all-zero Circle2D.
Definition: Circle2D.cpp:14
datatypes::Ellipse2D
A rotated 2-dimensional ellipse in the plane.
Definition: Ellipse2D.hpp:30
Ellipse2D.hpp
datatypes::Circle2D::base_class
Ellipse2D base_class
Base class.
Definition: Circle2D.hpp:25
datatypes::Circle2D::getRadius
value_type getRadius() const
Returns the radius of this circle.
Definition: Circle2D.hpp:60
datatypes::Ellipse2D::value_type
Point2D::value_type value_type
The type of the stored x, y coordinates, and the rotation.
Definition: Ellipse2D.hpp:34
datatypes::Circle2D::containsPoint
bool containsPoint(const Point2D &point) const
Returns true if the given Point2D is inside this ellipse or on its outline.
Definition: Circle2D.cpp:37
datatypes::Ellipse2D::m_radius
Point2D m_radius
Definition: Ellipse2D.hpp:37
UINT32
uint32_t UINT32
Definition: BasicDatatypes.hpp:26
datatypes::Circle2D
A circle in the plane.
Definition: Circle2D.hpp:21
datatypes
Definition: BasicDatatypes.hpp:91


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Wed Oct 26 2022 02:11:57