26 #ifndef TESSERACT_GEOMETRY_POLYGON_MESH_H
27 #define TESSERACT_GEOMETRY_POLYGON_MESH_H
31 #include <boost/serialization/export.hpp>
32 #include <Eigen/Geometry>
55 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
58 using Ptr = std::shared_ptr<PolygonMesh>;
59 using ConstPtr = std::shared_ptr<const PolygonMesh>;
76 PolygonMesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
77 std::shared_ptr<const Eigen::VectorXi> faces,
78 std::shared_ptr<const tesseract_common::Resource> resource =
nullptr,
79 const Eigen::Vector3d& scale = Eigen::Vector3d(1, 1, 1),
80 std::shared_ptr<const tesseract_common::VectorVector3d> normals =
nullptr,
81 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors =
nullptr,
82 std::shared_ptr<MeshMaterial> mesh_material =
nullptr,
83 std::shared_ptr<
const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures =
nullptr,
103 PolygonMesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
104 std::shared_ptr<const Eigen::VectorXi> faces,
106 std::shared_ptr<const tesseract_common::Resource> resource =
nullptr,
107 const Eigen::Vector3d& scale = Eigen::Vector3d(1, 1, 1),
108 std::shared_ptr<const tesseract_common::VectorVector3d> normals =
nullptr,
109 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors =
nullptr,
110 std::shared_ptr<MeshMaterial> mesh_material =
nullptr,
111 std::shared_ptr<
const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures =
nullptr,
121 const std::shared_ptr<const tesseract_common::VectorVector3d>&
getVertices()
const;
127 const std::shared_ptr<const Eigen::VectorXi>&
getFaces()
const;
148 std::shared_ptr<const tesseract_common::Resource>
getResource()
const;
154 const Eigen::Vector3d&
getScale()
const;
163 const std::shared_ptr<const tesseract_common::VectorVector3d>&
getNormals()
const;
172 const std::shared_ptr<const tesseract_common::VectorVector4d>&
getVertexColors()
const;
182 std::shared_ptr<const MeshMaterial>
getMaterial()
const;
194 const std::shared_ptr<const std::vector<std::shared_ptr<MeshTexture>>>&
getTextures()
const;
202 std::shared_ptr<const tesseract_common::VectorVector3d>
vertices_;
203 std::shared_ptr<const Eigen::VectorXi>
faces_;
207 std::shared_ptr<const tesseract_common::Resource>
resource_;
209 std::shared_ptr<const tesseract_common::VectorVector3d>
normals_;
216 template <
class Archive>
217 void serialize(Archive& ar,
const unsigned int version);
223 #endif // POLYGON_MESH_H