cone.cpp
Go to the documentation of this file.
1 
27 #include <boost/serialization/access.hpp>
28 #include <boost/serialization/base_object.hpp>
29 #include <boost/serialization/nvp.hpp>
31 
32 #include <tesseract_common/utils.h>
34 
35 namespace tesseract_geometry
36 {
37 Cone::Cone(double radius, double length) : Geometry(GeometryType::CONE), r_(radius), l_(length) {}
38 
39 double Cone::getRadius() const { return r_; }
40 double Cone::getLength() const { return l_; }
41 
42 Geometry::Ptr Cone::clone() const { return std::make_shared<Cone>(r_, l_); }
43 
44 bool Cone::operator==(const Cone& rhs) const
45 {
46  bool equal = true;
47  equal &= Geometry::operator==(rhs);
50  return equal;
51 }
52 bool Cone::operator!=(const Cone& rhs) const { return !operator==(rhs); }
53 
54 template <class Archive>
55 void Cone::serialize(Archive& ar, const unsigned int /*version*/)
56 {
57  ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Geometry);
58  ar& BOOST_SERIALIZATION_NVP(r_);
59  ar& BOOST_SERIALIZATION_NVP(l_);
60 }
61 } // namespace tesseract_geometry
62 
65 BOOST_CLASS_EXPORT_IMPLEMENT(tesseract_geometry::Cone)
tesseract_geometry::Cone::getRadius
double getRadius() const
Definition: cone.cpp:39
tesseract_geometry::Geometry::Ptr
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:72
tesseract_geometry::GeometryType::CONE
@ CONE
tesseract_geometry::Geometry
Definition: geometry.h:69
tesseract_geometry::Cone::operator!=
bool operator!=(const Cone &rhs) const
Definition: cone.cpp:52
utils.h
tesseract_geometry::GeometryType
GeometryType
Definition: geometry.h:48
tesseract_common::almostEqualRelativeAndAbs
bool almostEqualRelativeAndAbs(const Eigen::Ref< const Eigen::VectorXd > &v1, const Eigen::Ref< const Eigen::VectorXd > &v2, const Eigen::Ref< const Eigen::VectorXd > &max_diff, const Eigen::Ref< const Eigen::VectorXd > &max_rel_diff)
TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE
#define TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(Type)
tesseract_geometry::Cone::clone
Geometry::Ptr clone() const override final
Create a copy of this shape.
Definition: cone.cpp:42
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_geometry::Cone::r_
double r_
Definition: cone.h:62
tesseract_geometry::Cone::Cone
Cone()=default
tesseract_geometry::Cone::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: cone.cpp:55
cone.h
Tesseract Cone Geometry.
tesseract_geometry::Geometry::operator==
bool operator==(const Geometry &rhs) const
Definition: geometry.cpp:48
tesseract_geometry::Cone::l_
double l_
Definition: cone.h:63
serialization.h
tesseract_geometry::Cone::getLength
double getLength() const
Definition: cone.cpp:40
tesseract_geometry::Cone::operator==
bool operator==(const Cone &rhs) const
Definition: cone.cpp:44
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_geometry
Definition: fwd.h:31
macros.h
tesseract_geometry::Cone
Definition: cone.h:44


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