26#ifndef TESSERACT_GEOMETRY_CONVEX_MESH_H
27#define TESSERACT_GEOMETRY_CONVEX_MESH_H
31#include <boost/serialization/access.hpp>
32#include <boost/serialization/export.hpp>
33#include <Eigen/Geometry>
47 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
50 using Ptr = std::shared_ptr<ConvexMesh>;
51 using ConstPtr = std::shared_ptr<const ConvexMesh>;
75 ConvexMesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
76 std::shared_ptr<const Eigen::VectorXi>
faces,
78 const Eigen::Vector3d&
scale = Eigen::Vector3d(1, 1, 1),
79 std::shared_ptr<const tesseract_common::VectorVector3d> normals =
nullptr,
80 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors =
nullptr,
82 std::shared_ptr<
const std::vector<MeshTexture::Ptr>> mesh_textures =
nullptr)
88 std::move(vertex_colors),
89 std::move(mesh_material),
90 std::move(mesh_textures),
112 ConvexMesh(std::shared_ptr<const tesseract_common::VectorVector3d> vertices,
113 std::shared_ptr<const Eigen::VectorXi>
faces,
116 const Eigen::Vector3d&
scale = Eigen::Vector3d(1, 1, 1),
117 std::shared_ptr<const tesseract_common::VectorVector3d> normals =
nullptr,
118 std::shared_ptr<const tesseract_common::VectorVector4d> vertex_colors =
nullptr,
120 std::shared_ptr<
const std::vector<MeshTexture::Ptr>> mesh_textures =
nullptr)
127 std::move(vertex_colors),
128 std::move(mesh_material),
129 std::move(mesh_textures),
162 template <
class Archive>
163 void serialize(Archive& ar,
const unsigned int version);
std::shared_ptr< const Resource > ConstPtr
Definition: resource_locator.h:102
Definition: convex_mesh.h:44
void setCreationMethod(CreationMethod method)
Set the method used to create the convex mesh.
Definition: convex_mesh.h:149
~ConvexMesh() override=default
void serialize(Archive &ar, const unsigned int version)
Definition: convex_mesh.cpp:48
Geometry::Ptr clone() const override
Create a copy of this shape.
Definition: convex_mesh.h:151
std::shared_ptr< const ConvexMesh > ConstPtr
Definition: convex_mesh.h:51
ConvexMesh(std::shared_ptr< const tesseract_common::VectorVector3d > vertices, std::shared_ptr< const Eigen::VectorXi > faces, int face_count, tesseract_common::Resource::ConstPtr resource=nullptr, const Eigen::Vector3d &scale=Eigen::Vector3d(1, 1, 1), std::shared_ptr< const tesseract_common::VectorVector3d > normals=nullptr, std::shared_ptr< const tesseract_common::VectorVector4d > vertex_colors=nullptr, MeshMaterial::Ptr mesh_material=nullptr, std::shared_ptr< const std::vector< MeshTexture::Ptr > > mesh_textures=nullptr)
Convex Mesh geometry.
Definition: convex_mesh.h:112
bool operator!=(const ConvexMesh &rhs) const
Definition: convex_mesh.cpp:45
CreationMethod
Definition: convex_mesh.h:54
@ CONVERTED
Definition: convex_mesh.h:57
@ DEFAULT
Definition: convex_mesh.h:55
@ MESH
Definition: convex_mesh.h:56
ConvexMesh(std::shared_ptr< const tesseract_common::VectorVector3d > vertices, std::shared_ptr< const Eigen::VectorXi > faces, tesseract_common::Resource::ConstPtr resource=nullptr, const Eigen::Vector3d &scale=Eigen::Vector3d(1, 1, 1), std::shared_ptr< const tesseract_common::VectorVector3d > normals=nullptr, std::shared_ptr< const tesseract_common::VectorVector4d > vertex_colors=nullptr, MeshMaterial::Ptr mesh_material=nullptr, std::shared_ptr< const std::vector< MeshTexture::Ptr > > mesh_textures=nullptr)
Convex Mesh geometry.
Definition: convex_mesh.h:75
CreationMethod getCreationMethod() const
Get how the convex hull was created.
Definition: convex_mesh.h:142
friend class boost::serialization::access
Definition: convex_mesh.h:161
bool operator==(const ConvexMesh &rhs) const
Definition: convex_mesh.cpp:38
std::shared_ptr< ConvexMesh > Ptr
Definition: convex_mesh.h:50
CreationMethod creation_method_
Definition: convex_mesh.h:159
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:62
std::shared_ptr< MeshMaterial > Ptr
Definition: mesh_material.h:63
Definition: polygon_mesh.h:46
const std::shared_ptr< const Eigen::VectorXi > & getFaces() const
Get Polygon mesh faces.
Definition: polygon_mesh.h:152
int getFaceCount() const
Get face count.
Definition: polygon_mesh.h:164
tesseract_common::Resource::ConstPtr getResource() const
Get the path to file used to generate the mesh.
Definition: polygon_mesh.h:173
const std::shared_ptr< const tesseract_common::VectorVector3d > & getVertices() const
Get Polygon mesh vertices.
Definition: polygon_mesh.h:146
const Eigen::Vector3d & getScale() const
Get the scale applied to file used to generate the mesh.
Definition: polygon_mesh.h:179
double scale
Definition: collision_margin_data_unit.cpp:133
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Tesseract Mesh Material read from a mesh file.
Definition: create_convex_hull.cpp:36
Definition: geometry.h:39
GeometryType
Definition: geometry.h:41
@ CONVEX_MESH
Definition: geometry.h:50
Tesseract Polygon Mesh Geometry.
Resource::Ptr resource
Definition: resource_locator_unit.cpp:59
std::shared_ptr< const Eigen::VectorXi > faces
Definition: tesseract_geometry_unit.cpp:16