sphere.h
Go to the documentation of this file.
1 
26 #ifndef TESSERACT_GEOMETRY_SPHERE_H
27 #define TESSERACT_GEOMETRY_SPHERE_H
28 
31 #include <boost/serialization/export.hpp>
32 #include <memory>
34 
36 
37 namespace boost::serialization
38 {
39 class access;
40 }
41 
42 namespace tesseract_geometry
43 {
44 class Sphere : public Geometry
45 {
46 public:
47  using Ptr = std::shared_ptr<Sphere>;
48  using ConstPtr = std::shared_ptr<const Sphere>;
49 
50  explicit Sphere(double r);
51  Sphere() = default;
52  ~Sphere() override = default;
53 
54  double getRadius() const;
55 
56  Geometry::Ptr clone() const override final;
57  bool operator==(const Sphere& rhs) const;
58  bool operator!=(const Sphere& rhs) const;
59 
60 private:
61  double r_{ 0 };
62 
65  template <class Archive>
66  void serialize(Archive& ar, const unsigned int version); // NOLINT
67 };
68 } // namespace tesseract_geometry
69 
70 BOOST_CLASS_EXPORT_KEY(tesseract_geometry::Sphere)
71 #endif
tesseract_geometry::Geometry::Ptr
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:72
tesseract_geometry::Geometry
Definition: geometry.h:69
geometry.h
Tesseract Geometries.
tesseract_geometry::Sphere
Definition: sphere.h:44
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_common::Serialization
tesseract_geometry::Sphere::clone
Geometry::Ptr clone() const override final
Create a copy of this shape.
Definition: sphere.cpp:41
tesseract_geometry::Sphere::~Sphere
~Sphere() override=default
tesseract_geometry::Sphere::getRadius
double getRadius() const
Definition: sphere.cpp:39
tesseract_geometry::Sphere::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: sphere.cpp:53
boost::serialization
tesseract_geometry::Sphere::access
friend class boost::serialization::access
Definition: sphere.h:63
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_geometry
Definition: fwd.h:31
tesseract_geometry::Sphere::r_
double r_
Definition: sphere.h:61
tesseract_geometry::Geometry::ConstPtr
std::shared_ptr< const Geometry > ConstPtr
Definition: geometry.h:73
macros.h
tesseract_geometry::Sphere::Sphere
Sphere()=default


tesseract_geometry
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:46