Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
plane.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_GEOMETRY_PLANE_H
27#define TESSERACT_GEOMETRY_PLANE_H
28
31#include <boost/serialization/access.hpp>
32#include <boost/serialization/export.hpp>
33#include <memory>
35
37
38namespace tesseract_geometry
39{
40class Plane : public Geometry
41{
42public:
43 using Ptr = std::shared_ptr<Plane>;
44 using ConstPtr = std::shared_ptr<const Plane>;
45
46 Plane(double a, double b, double c, double d) : Geometry(GeometryType::PLANE), a_(a), b_(b), c_(c), d_(d) {}
47 Plane() = default;
48 ~Plane() override = default;
49
50 double getA() const { return a_; }
51 double getB() const { return b_; }
52 double getC() const { return c_; }
53 double getD() const { return d_; }
54
55 Geometry::Ptr clone() const override final { return std::make_shared<Plane>(a_, b_, c_, d_); }
56 bool operator==(const Plane& rhs) const;
57 bool operator!=(const Plane& rhs) const;
58
59private:
60 double a_{ 0 };
61 double b_{ 0 };
62 double c_{ 0 };
63 double d_{ 0 };
64
66 template <class Archive>
67 void serialize(Archive& ar, const unsigned int version); // NOLINT
68};
69} // namespace tesseract_geometry
70
71BOOST_CLASS_EXPORT_KEY2(tesseract_geometry::Plane, "Plane")
72#endif
Definition: geometry.h:60
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:62
Definition: plane.h:41
Geometry::Ptr clone() const override final
Create a copy of this shape.
Definition: plane.h:55
double a_
Definition: plane.h:60
double getB() const
Definition: plane.h:51
double getD() const
Definition: plane.h:53
double getA() const
Definition: plane.h:50
std::shared_ptr< Plane > Ptr
Definition: plane.h:43
void serialize(Archive &ar, const unsigned int version)
Definition: plane.cpp:51
bool operator==(const Plane &rhs) const
Definition: plane.cpp:38
double b_
Definition: plane.h:61
double getC() const
Definition: plane.h:52
friend class boost::serialization::access
Definition: plane.h:65
~Plane() override=default
std::shared_ptr< const Plane > ConstPtr
Definition: plane.h:44
double d_
Definition: plane.h:63
bool operator!=(const Plane &rhs) const
Definition: plane.cpp:48
double c_
Definition: plane.h:62
Plane(double a, double b, double c, double d)
Definition: plane.h:46
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
@ PLANE
Definition: geometry.h:48
Tesseract Geometries.