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