Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Friends | List of all members
tesseract_geometry::SDFMesh Class Reference

#include <sdf_mesh.h>

Inheritance diagram for tesseract_geometry::SDFMesh:
Inheritance graph
[legend]
Collaboration diagram for tesseract_geometry::SDFMesh:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< SDFMesh >
 
using ConstPtr = std::shared_ptr< const SDFMesh >
 
- Public Types inherited from tesseract_geometry::PolygonMesh
using Ptr = std::shared_ptr< PolygonMesh >
 
using ConstPtr = std::shared_ptr< const PolygonMesh >
 
- Public Types inherited from tesseract_geometry::Geometry
using Ptr = std::shared_ptr< Geometry >
 
using ConstPtr = std::shared_ptr< const Geometry >
 

Public Member Functions

 SDFMesh (std::shared_ptr< const tesseract_common::VectorVector3d > vertices, std::shared_ptr< const Eigen::VectorXi > triangles, tesseract_common::Resource::Ptr 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)
 SDF Mesh geometry. More...
 
 SDFMesh (std::shared_ptr< const tesseract_common::VectorVector3d > vertices, std::shared_ptr< const Eigen::VectorXi > triangles, int triangle_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)
 SDF Mesh geometry. More...
 
 SDFMesh ()=default
 
 ~SDFMesh () override=default
 
Geometry::Ptr clone () const override
 Create a copy of this shape. More...
 
bool operator== (const SDFMesh &rhs) const
 
bool operator!= (const SDFMesh &rhs) const
 
- Public Member Functions inherited from tesseract_geometry::PolygonMesh
 PolygonMesh (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, GeometryType type=GeometryType::CONVEX_MESH)
 Polygon Mesh geometry. More...
 
 PolygonMesh (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, GeometryType type=GeometryType::CONVEX_MESH)
 Polygon Mesh geometry. More...
 
 PolygonMesh ()=default
 
 ~PolygonMesh () override=default
 
const std::shared_ptr< const tesseract_common::VectorVector3d > & getVertices () const
 Get Polygon mesh vertices. More...
 
const std::shared_ptr< const Eigen::VectorXi > & getFaces () const
 Get Polygon mesh faces. More...
 
int getVertexCount () const
 Get vertex count. More...
 
int getFaceCount () const
 Get face count. More...
 
tesseract_common::Resource::ConstPtr getResource () const
 Get the path to file used to generate the mesh. More...
 
const Eigen::Vector3d & getScale () const
 Get the scale applied to file used to generate the mesh. More...
 
const std::shared_ptr< const tesseract_common::VectorVector3d > & getNormals () const
 Get the vertex normal vectors. More...
 
const std::shared_ptr< const tesseract_common::VectorVector4d > & getVertexColors () const
 Get the vertex colors. More...
 
MeshMaterial::ConstPtr getMaterial () const
 Get material data extracted from the mesh file. More...
 
const std::shared_ptr< const std::vector< MeshTexture::Ptr > > & getTextures () const
 Get textures extracted from the mesh file. More...
 
Geometry::Ptr clone () const override
 Create a copy of this shape. More...
 
bool operator== (const PolygonMesh &rhs) const
 
bool operator!= (const PolygonMesh &rhs) const
 
- Public Member Functions inherited from tesseract_geometry::Geometry
 Geometry (GeometryType type=GeometryType::UNINITIALIZED)
 
virtual ~Geometry ()=default
 
 Geometry (const Geometry &)=default
 
Geometryoperator= (const Geometry &)=default
 
 Geometry (Geometry &&)=default
 
Geometryoperator= (Geometry &&)=default
 
virtual Geometry::Ptr clone () const =0
 Create a copy of this shape. More...
 
GeometryType getType () const
 
bool operator== (const Geometry &rhs) const
 
bool operator!= (const Geometry &rhs) const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Member Typedef Documentation

◆ ConstPtr

using tesseract_geometry::SDFMesh::ConstPtr = std::shared_ptr<const SDFMesh>

◆ Ptr

using tesseract_geometry::SDFMesh::Ptr = std::shared_ptr<SDFMesh>

Constructor & Destructor Documentation

◆ SDFMesh() [1/3]

tesseract_geometry::SDFMesh::SDFMesh ( std::shared_ptr< const tesseract_common::VectorVector3d vertices,
std::shared_ptr< const Eigen::VectorXi >  triangles,
tesseract_common::Resource::Ptr  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 
)
inline

SDF Mesh geometry.

Parameters
verticesA vector of vertices associated with the mesh
trianglesA vector of face indices where the first index indicates the number of vertices associated with the face followed by the vertices index in parameter vertices. For example a triangle has three vertices so there should be four inputs where the first should be 3 indicating there are three vertices that define this face followed by three indices.
resourceA resource locator for locating resource
scaleScale the mesh
normalsA vector of normals for the vertices (optional)
vertex_colorsA vector of colors (RGBA) for the vertices (optional)
mesh_materialA MeshMaterial describing the color and material properties of the mesh (optional)
mesh_texturesA vector of MeshTexture to apply to the mesh (optional)

◆ SDFMesh() [2/3]

tesseract_geometry::SDFMesh::SDFMesh ( std::shared_ptr< const tesseract_common::VectorVector3d vertices,
std::shared_ptr< const Eigen::VectorXi >  triangles,
int  triangle_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 
)
inline

SDF Mesh geometry.

Parameters
verticesA vector of vertices associated with the mesh
trianglesA vector of face indices where the first index indicates the number of vertices associated with the face followed by the vertices index in parameter vertices. For example a triangle has three vertices so there should be four inputs where the first should be 3 indicating there are three vertices that define this face followed by three indices.
triangle_countProvide the number of faces. This is faster because it does not need to loop over triangles.
resourceA resource locator for locating resource
scaleScale the mesh
normalsA vector of normals for the vertices (optional)
vertex_colorsA vector of colors (RGBA) for the vertices (optional)
mesh_materialA MeshMaterial describing the color and material properties of the mesh (optional)
mesh_texturesA vector of MeshTexture to apply to the mesh (optional)

◆ SDFMesh() [3/3]

tesseract_geometry::SDFMesh::SDFMesh ( )
default

◆ ~SDFMesh()

tesseract_geometry::SDFMesh::~SDFMesh ( )
overridedefault

Member Function Documentation

◆ clone()

Geometry::Ptr tesseract_geometry::SDFMesh::clone ( ) const
inlineoverridevirtual

Create a copy of this shape.

Reimplemented from tesseract_geometry::PolygonMesh.

◆ operator!=()

bool tesseract_geometry::SDFMesh::operator!= ( const SDFMesh rhs) const

◆ operator==()

bool tesseract_geometry::SDFMesh::operator== ( const SDFMesh rhs) const

◆ serialize()

template<class Archive >
void tesseract_geometry::SDFMesh::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

The documentation for this class was generated from the following files: