mesh.h
Go to the documentation of this file.
1 
26 #ifndef TESSERACT_GEOMETRY_MESH_H
27 #define TESSERACT_GEOMETRY_MESH_H
28 
31 #include <boost/serialization/export.hpp>
32 #include <Eigen/Geometry>
33 #include <memory>
35 
37 
38 namespace boost::serialization
39 {
40 class access;
41 }
42 
43 namespace tesseract_geometry
44 {
45 class Mesh : public PolygonMesh
46 {
47 public:
48  // LCOV_EXCL_START
49  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
50  // LCOV_EXCL_STOP
51 
52  using Ptr = std::shared_ptr<Mesh>;
53  using ConstPtr = std::shared_ptr<const Mesh>;
54 
69  Mesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
70  std::shared_ptr<const Eigen::VectorXi> triangles,
71  std::shared_ptr<const tesseract_common::Resource> resource = nullptr,
72  const Eigen::Vector3d& scale = Eigen::Vector3d(1, 1, 1),
73  std::shared_ptr<const tesseract_common::VectorVector3d> normals = nullptr,
74  std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors = nullptr,
75  std::shared_ptr<MeshMaterial> mesh_material = nullptr,
76  std::shared_ptr<const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures = nullptr);
93  Mesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
94  std::shared_ptr<const Eigen::VectorXi> triangles,
95  int triangle_count,
96  std::shared_ptr<const tesseract_common::Resource> resource = nullptr,
97  const Eigen::Vector3d& scale = Eigen::Vector3d(1, 1, 1),
98  std::shared_ptr<const tesseract_common::VectorVector3d> normals = nullptr,
99  std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors = nullptr,
100  std::shared_ptr<MeshMaterial> mesh_material = nullptr,
101  std::shared_ptr<const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures = nullptr);
102 
103  Mesh() = default;
104  ~Mesh() override = default;
105 
106  Geometry::Ptr clone() const override final;
107 
108  bool operator==(const Mesh& rhs) const;
109  bool operator!=(const Mesh& rhs) const;
110 
111 private:
112  friend class boost::serialization::access;
113  friend struct tesseract_common::Serialization;
114  template <class Archive>
115  void serialize(Archive& ar, const unsigned int version); // NOLINT
116 };
117 } // namespace tesseract_geometry
118 
119 BOOST_CLASS_EXPORT_KEY(tesseract_geometry::Mesh)
120 #endif
tesseract_geometry::Mesh
Definition: mesh.h:45
tesseract_geometry::Geometry::Ptr
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:72
tesseract_common
tesseract_geometry::Mesh::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: mesh.cpp:124
boost
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_geometry::Mesh::~Mesh
~Mesh() override=default
tesseract_geometry::Mesh::clone
Geometry::Ptr clone() const override final
Create a copy of this shape.
Definition: mesh.cpp:84
boost::serialization
polygon_mesh.h
Tesseract Polygon Mesh Geometry.
tesseract_geometry::PolygonMesh
Definition: polygon_mesh.h:51
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_geometry
Definition: fwd.h:31
tesseract_geometry::Mesh::Mesh
Mesh()=default
tesseract_geometry::Geometry::ConstPtr
std::shared_ptr< const Geometry > ConstPtr
Definition: geometry.h:73
macros.h


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