27 #include <boost/serialization/access.hpp>
28 #include <boost/serialization/base_object.hpp>
29 #include <boost/serialization/nvp.hpp>
38 Mesh::Mesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
39 std::shared_ptr<const Eigen::VectorXi> triangles,
40 std::shared_ptr<const tesseract_common::Resource> resource,
41 const Eigen::Vector3d& scale,
42 std::shared_ptr<const tesseract_common::VectorVector3d> normals,
43 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors,
44 std::shared_ptr<MeshMaterial> mesh_material,
45 std::shared_ptr<
const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures)
51 std::move(vertex_colors),
52 std::move(mesh_material),
53 std::move(mesh_textures),
57 std::throw_with_nested(std::runtime_error(
"Mesh is not triangular"));
60 Mesh::Mesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
61 std::shared_ptr<const Eigen::VectorXi> triangles,
63 std::shared_ptr<const tesseract_common::Resource> resource,
64 const Eigen::Vector3d& scale,
65 std::shared_ptr<const tesseract_common::VectorVector3d> normals,
66 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors,
67 std::shared_ptr<MeshMaterial> mesh_material,
68 std::shared_ptr<
const std::vector<std::shared_ptr<MeshTexture>>> mesh_textures)
75 std::move(vertex_colors),
76 std::move(mesh_material),
77 std::move(mesh_textures),
81 std::throw_with_nested(std::runtime_error(
"Mesh is not triangular"));
87 std::shared_ptr<Mesh> ptr;
123 template <
class Archive>
126 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
PolygonMesh);