Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
cone.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_GEOMETRY_CONE_H
27#define TESSERACT_GEOMETRY_CONE_H
28
31#include <boost/serialization/access.hpp>
32#include <boost/serialization/export.hpp>
33#include <memory>
35
37
38namespace tesseract_geometry
39{
40class Cone : public Geometry
41{
42public:
43 using Ptr = std::shared_ptr<Cone>;
44 using ConstPtr = std::shared_ptr<const Cone>;
45
46 Cone(double r, double l) : Geometry(GeometryType::CONE), r_(r), l_(l) {}
47 Cone() = default;
48 ~Cone() override = default;
49
50 double getRadius() const { return r_; }
51 double getLength() const { return l_; }
52
53 Geometry::Ptr clone() const override final { return std::make_shared<Cone>(r_, l_); }
54 bool operator==(const Cone& rhs) const;
55 bool operator!=(const Cone& rhs) const;
56
57private:
58 double r_{ 0 };
59 double l_{ 0 };
60
62 template <class Archive>
63 void serialize(Archive& ar, const unsigned int version); // NOLINT
64};
65} // namespace tesseract_geometry
66
67BOOST_CLASS_EXPORT_KEY2(tesseract_geometry::Cone, "Cone")
68#endif
Definition: cone.h:41
double l_
Definition: cone.h:59
double getRadius() const
Definition: cone.h:50
bool operator!=(const Cone &rhs) const
Definition: cone.cpp:46
void serialize(Archive &ar, const unsigned int version)
Definition: cone.cpp:49
std::shared_ptr< const Cone > ConstPtr
Definition: cone.h:44
Cone(double r, double l)
Definition: cone.h:46
~Cone() override=default
Geometry::Ptr clone() const override final
Create a copy of this shape.
Definition: cone.h:53
double getLength() const
Definition: cone.h:51
std::shared_ptr< Cone > Ptr
Definition: cone.h:43
bool operator==(const Cone &rhs) const
Definition: cone.cpp:38
friend class boost::serialization::access
Definition: cone.h:61
double r_
Definition: cone.h:58
Definition: geometry.h:60
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:62
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: geometry.h:39
GeometryType
Definition: geometry.h:41
@ CONE
Definition: geometry.h:46
Tesseract Geometries.