Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Friends
pcl::geometry::PolygonMesh< MeshTraitsT > Class Template Reference

General half-edge mesh that can store any polygon with a minimum number of vertices of 3. More...

#include <pcl/geometry/polygon_mesh.h>

+ Inheritance diagram for pcl::geometry::PolygonMesh< MeshTraitsT >:
+ Collaboration diagram for pcl::geometry::PolygonMesh< MeshTraitsT >:

Public Types

using Base = pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
 
using Self = PolygonMesh< MeshTraitsT >
 
using Ptr = shared_ptr< Self >
 
using ConstPtr = shared_ptr< const Self >
 
using VertexData = typename Base::VertexData
 
using HalfEdgeData = typename Base::HalfEdgeData
 
using EdgeData = typename Base::EdgeData
 
using FaceData = typename Base::FaceData
 
using IsManifold = typename Base::IsManifold
 
using MeshTag = typename Base::MeshTag
 
using HasVertexData = typename Base::HasVertexData
 
using HasHalfEdgeData = typename Base::HasHalfEdgeData
 
using HasEdgeData = typename Base::HasEdgeData
 
using HasFaceData = typename Base::HasFaceData
 
using VertexDataCloud = typename Base::VertexDataCloud
 
using HalfEdgeDataCloud = typename Base::HalfEdgeDataCloud
 
using EdgeDataCloud = typename Base::EdgeDataCloud
 
using FaceDataCloud = typename Base::FaceDataCloud
 
using VertexIndex = typename Base::VertexIndex
 
using HalfEdgeIndex = typename Base::HalfEdgeIndex
 
using EdgeIndex = typename Base::EdgeIndex
 
using FaceIndex = typename Base::FaceIndex
 
using VertexIndices = typename Base::VertexIndices
 
using HalfEdgeIndices = typename Base::HalfEdgeIndices
 
using EdgeIndices = typename Base::EdgeIndices
 
using FaceIndices = typename Base::FaceIndices
 
using VertexAroundVertexCirculator = typename Base::VertexAroundVertexCirculator
 
using OutgoingHalfEdgeAroundVertexCirculator = typename Base::OutgoingHalfEdgeAroundVertexCirculator
 
using IncomingHalfEdgeAroundVertexCirculator = typename Base::IncomingHalfEdgeAroundVertexCirculator
 
using FaceAroundVertexCirculator = typename Base::FaceAroundVertexCirculator
 
using VertexAroundFaceCirculator = typename Base::VertexAroundFaceCirculator
 
using InnerHalfEdgeAroundFaceCirculator = typename Base::InnerHalfEdgeAroundFaceCirculator
 
using OuterHalfEdgeAroundFaceCirculator = typename Base::OuterHalfEdgeAroundFaceCirculator
 
using FaceAroundFaceCirculator = typename Base::FaceAroundFaceCirculator
 
- Public Types inherited from pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
using Self = MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
 
using Ptr = shared_ptr< Self >
 
using ConstPtr = shared_ptr< const Self >
 
using Derived = PolygonMesh< MeshTraitsT >
 
using VertexData = typename MeshTraitsT::VertexData
 
using HalfEdgeData = typename MeshTraitsT::HalfEdgeData
 
using EdgeData = typename MeshTraitsT::EdgeData
 
using FaceData = typename MeshTraitsT::FaceData
 
using IsManifold = typename MeshTraitsT::IsManifold
 
using MeshTag = PolygonMeshTag
 
using HasVertexData = std::integral_constant< bool, !std::is_same< VertexData, pcl::geometry::NoData >::value >
 
using HasHalfEdgeData = std::integral_constant< bool, !std::is_same< HalfEdgeData, pcl::geometry::NoData >::value >
 
using HasEdgeData = std::integral_constant< bool, !std::is_same< EdgeData, pcl::geometry::NoData >::value >
 
using HasFaceData = std::integral_constant< bool, !std::is_same< FaceData, pcl::geometry::NoData >::value >
 
using VertexDataCloud = pcl::PointCloud< VertexData >
 
using HalfEdgeDataCloud = pcl::PointCloud< HalfEdgeData >
 
using EdgeDataCloud = pcl::PointCloud< EdgeData >
 
using FaceDataCloud = pcl::PointCloud< FaceData >
 
using VertexIndex = pcl::geometry::VertexIndex
 
using HalfEdgeIndex = pcl::geometry::HalfEdgeIndex
 
using EdgeIndex = pcl::geometry::EdgeIndex
 
using FaceIndex = pcl::geometry::FaceIndex
 
using VertexIndices = std::vector< VertexIndex >
 
using HalfEdgeIndices = std::vector< HalfEdgeIndex >
 
using EdgeIndices = std::vector< EdgeIndex >
 
using FaceIndices = std::vector< FaceIndex >
 
using VertexAroundVertexCirculator = pcl::geometry::VertexAroundVertexCirculator< const Self >
 
using OutgoingHalfEdgeAroundVertexCirculator = pcl::geometry::OutgoingHalfEdgeAroundVertexCirculator< const Self >
 
using IncomingHalfEdgeAroundVertexCirculator = pcl::geometry::IncomingHalfEdgeAroundVertexCirculator< const Self >
 
using FaceAroundVertexCirculator = pcl::geometry::FaceAroundVertexCirculator< const Self >
 
using VertexAroundFaceCirculator = pcl::geometry::VertexAroundFaceCirculator< const Self >
 
using InnerHalfEdgeAroundFaceCirculator = pcl::geometry::InnerHalfEdgeAroundFaceCirculator< const Self >
 
using OuterHalfEdgeAroundFaceCirculator = pcl::geometry::OuterHalfEdgeAroundFaceCirculator< const Self >
 
using FaceAroundFaceCirculator = pcl::geometry::FaceAroundFaceCirculator< const Self >
 

Public Member Functions

 PolygonMesh ()
 Constructor. More...
 
FaceIndex addFace (const VertexIndex &idx_v_0, const VertexIndex &idx_v_1, const VertexIndex &idx_v_2, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
 Add a triangle to the mesh. More...
 
FaceIndex addFace (const VertexIndex &idx_v_0, const VertexIndex &idx_v_1, const VertexIndex &idx_v_2, const VertexIndex &idx_v_3, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
 Add a quad to the mesh. More...
 
- Public Member Functions inherited from pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
 MeshBase ()
 Constructor. More...
 
VertexIndex addVertex (const VertexData &vertex_data=VertexData())
 Add a vertex to the mesh. More...
 
FaceIndex addFace (const VertexIndices &vertices, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
 Add a face to the mesh. More...
 
void deleteVertex (const VertexIndex &idx_vertex)
 Mark the given vertex and all connected half-edges and faces as deleted. More...
 
void deleteEdge (const HalfEdgeIndex &idx_he)
 Mark the given half-edge, the opposite half-edge and the associated faces as deleted. More...
 
void deleteEdge (const EdgeIndex &idx_edge)
 Mark the given edge (both half-edges) and the associated faces as deleted. More...
 
void deleteFace (const FaceIndex &idx_face)
 Mark the given face as deleted. More...
 
void cleanUp ()
 Removes all mesh elements and data that are marked as deleted. More...
 
HalfEdgeIndex getOutgoingHalfEdgeIndex (const VertexIndex &idx_vertex) const
 Get the outgoing half-edge index to a given vertex. More...
 
HalfEdgeIndex getIncomingHalfEdgeIndex (const VertexIndex &idx_vertex) const
 Get the incoming half-edge index to a given vertex. More...
 
VertexIndex getTerminatingVertexIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the terminating vertex index to a given half-edge. More...
 
VertexIndex getOriginatingVertexIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the originating vertex index to a given half-edge. More...
 
HalfEdgeIndex getOppositeHalfEdgeIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the opposite half-edge index to a given half-edge. More...
 
HalfEdgeIndex getNextHalfEdgeIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the next half-edge index to a given half-edge. More...
 
HalfEdgeIndex getPrevHalfEdgeIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the previous half-edge index to a given half-edge. More...
 
FaceIndex getFaceIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the face index to a given half-edge. More...
 
FaceIndex getFaceIndex (const FaceData &face_data) const
 Get the index associated to the given face data. More...
 
FaceIndex getOppositeFaceIndex (const HalfEdgeIndex &idx_half_edge) const
 Get the face index to a given half-edge. More...
 
HalfEdgeIndex getInnerHalfEdgeIndex (const FaceIndex &idx_face) const
 Get the inner half-edge index to a given face. More...
 
HalfEdgeIndex getOuterHalfEdgeIndex (const FaceIndex &idx_face) const
 Get the outer half-edge inex to a given face. More...
 
VertexAroundVertexCirculator getVertexAroundVertexCirculator (const VertexIndex &idx_vertex) const
 
VertexAroundVertexCirculator getVertexAroundVertexCirculator (const HalfEdgeIndex &idx_outgoing_half_edge) const
 
OutgoingHalfEdgeAroundVertexCirculator getOutgoingHalfEdgeAroundVertexCirculator (const VertexIndex &idx_vertex) const
 
OutgoingHalfEdgeAroundVertexCirculator getOutgoingHalfEdgeAroundVertexCirculator (const HalfEdgeIndex &idx_outgoing_half_edge) const
 
IncomingHalfEdgeAroundVertexCirculator getIncomingHalfEdgeAroundVertexCirculator (const VertexIndex &idx_vertex) const
 
IncomingHalfEdgeAroundVertexCirculator getIncomingHalfEdgeAroundVertexCirculator (const HalfEdgeIndex &idx_incoming_half_edge) const
 
FaceAroundVertexCirculator getFaceAroundVertexCirculator (const VertexIndex &idx_vertex) const
 
FaceAroundVertexCirculator getFaceAroundVertexCirculator (const HalfEdgeIndex &idx_outgoing_half_edge) const
 
VertexAroundFaceCirculator getVertexAroundFaceCirculator (const FaceIndex &idx_face) const
 
VertexAroundFaceCirculator getVertexAroundFaceCirculator (const HalfEdgeIndex &idx_inner_half_edge) const
 
InnerHalfEdgeAroundFaceCirculator getInnerHalfEdgeAroundFaceCirculator (const FaceIndex &idx_face) const
 
InnerHalfEdgeAroundFaceCirculator getInnerHalfEdgeAroundFaceCirculator (const HalfEdgeIndex &idx_inner_half_edge) const
 
OuterHalfEdgeAroundFaceCirculator getOuterHalfEdgeAroundFaceCirculator (const FaceIndex &idx_face) const
 
OuterHalfEdgeAroundFaceCirculator getOuterHalfEdgeAroundFaceCirculator (const HalfEdgeIndex &idx_inner_half_edge) const
 
FaceAroundFaceCirculator getFaceAroundFaceCirculator (const FaceIndex &idx_face) const
 
FaceAroundFaceCirculator getFaceAroundFaceCirculator (const HalfEdgeIndex &idx_inner_half_edge) const
 
bool isEqualTopology (const Self &other) const
 Check if the other mesh has the same topology as this mesh. More...
 
bool isValid (const VertexIndex &idx_vertex) const
 Check if the given vertex index is a valid index into the mesh. More...
 
bool isValid (const HalfEdgeIndex &idx_he) const
 Check if the given half-edge index is a valid index into the mesh. More...
 
bool isValid (const EdgeIndex &idx_edge) const
 Check if the given edge index is a valid index into the mesh. More...
 
bool isValid (const FaceIndex &idx_face) const
 Check if the given face index is a valid index into the mesh. More...
 
bool isDeleted (const VertexIndex &idx_vertex) const
 Check if the given vertex is marked as deleted. More...
 
bool isDeleted (const HalfEdgeIndex &idx_he) const
 Check if the given half-edge is marked as deleted. More...
 
bool isDeleted (const EdgeIndex &idx_edge) const
 Check if the given edge (any of the two half-edges) is marked as deleted. More...
 
bool isDeleted (const FaceIndex &idx_face) const
 Check if the given face is marked as deleted. More...
 
bool isIsolated (const VertexIndex &idx_vertex) const
 Check if the given vertex is isolated (not connected to other elements). More...
 
bool isBoundary (const VertexIndex &idx_vertex) const
 Check if the given vertex lies on the boundary. More...
 
bool isBoundary (const HalfEdgeIndex &idx_he) const
 Check if the given half-edge lies on the boundary. More...
 
bool isBoundary (const EdgeIndex &idx_edge) const
 Check if the given edge lies on the boundary (any of the two half-edges lies on the boundary. More...
 
bool isBoundary (const FaceIndex &idx_face) const
 Check if the given face lies on the boundary. More...
 
bool isBoundary (const FaceIndex &idx_face) const
 Check if the given face lies on the boundary. More...
 
bool isManifold (const VertexIndex &idx_vertex) const
 Check if the given vertex is manifold. More...
 
bool isManifold () const
 Check if the mesh is manifold. More...
 
std::size_t sizeVertices () const
 Get the number of the vertices. More...
 
std::size_t sizeHalfEdges () const
 Get the number of the half-edges. More...
 
std::size_t sizeEdges () const
 Get the number of the edges. More...
 
std::size_t sizeFaces () const
 Get the number of the faces. More...
 
bool empty () const
 Check if the mesh is empty. More...
 
bool emptyVertices () const
 Check if the vertices are empty. More...
 
bool emptyEdges () const
 Check if the edges are empty. More...
 
bool emptyFaces () const
 Check if the faces are empty. More...
 
void reserveVertices (const std::size_t n)
 Reserve storage space n vertices. More...
 
void reserveEdges (const std::size_t n)
 Reserve storage space for n edges (2*n storage space is reserved for the half-edges). More...
 
void reserveFaces (const std::size_t n)
 Reserve storage space for n faces. More...
 
void resizeVertices (const std::size_t n, const VertexData &data=VertexData())
 Resize the the vertices to n elements. More...
 
void resizeEdges (const std::size_t n, const EdgeData &edge_data=EdgeData(), const HalfEdgeData he_data=HalfEdgeData())
 Resize the edges to n elements (half-edges will hold 2*n elements). More...
 
void resizeFaces (const std::size_t n, const FaceData &data=FaceData())
 Resize the faces to n elements. More...
 
void clear ()
 Clear all mesh elements and data. More...
 
VertexDataCloudgetVertexDataCloud ()
 Get access to the stored vertex data. More...
 
VertexDataCloud getVertexDataCloud () const
 Get the stored vertex data. More...
 
bool setVertexDataCloud (const VertexDataCloud &vertex_data_cloud)
 Change the stored vertex data. More...
 
HalfEdgeDataCloudgetHalfEdgeDataCloud ()
 Get access to the stored half-edge data. More...
 
HalfEdgeDataCloud getHalfEdgeDataCloud () const
 Get the stored half-edge data. More...
 
bool setHalfEdgeDataCloud (const HalfEdgeDataCloud &half_edge_data_cloud)
 Change the stored half-edge data. More...
 
EdgeDataCloudgetEdgeDataCloud ()
 Get access to the stored edge data. More...
 
EdgeDataCloud getEdgeDataCloud () const
 Get the stored edge data. More...
 
bool setEdgeDataCloud (const EdgeDataCloud &edge_data_cloud)
 Change the stored edge data. More...
 
FaceDataCloudgetFaceDataCloud ()
 Get access to the stored face data. More...
 
FaceDataCloud getFaceDataCloud () const
 Get the stored face data. More...
 
bool setFaceDataCloud (const FaceDataCloud &face_data_cloud)
 Change the stored face data. More...
 
VertexIndex getVertexIndex (const VertexData &vertex_data) const
 Get the index associated to the given vertex data. More...
 
HalfEdgeIndex getHalfEdgeIndex (const HalfEdgeData &half_edge_data) const
 Get the index associated to the given half-edge data. More...
 
EdgeIndex getEdgeIndex (const EdgeData &edge_data) const
 Get the index associated to the given edge data. More...
 

Friends

class pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, pcl::geometry::PolygonMeshTag >
 

Additional Inherited Members

- Protected Types inherited from pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
using Vertex = pcl::geometry::Vertex
 
using HalfEdge = pcl::geometry::HalfEdge
 
using Face = pcl::geometry::Face
 
using Vertices = std::vector< Vertex >
 
using HalfEdges = std::vector< HalfEdge >
 
using Faces = std::vector< Face >
 
using VertexIterator = typename Vertices::iterator
 
using HalfEdgeIterator = typename HalfEdges::iterator
 
using FaceIterator = typename Faces::iterator
 
using VertexConstIterator = typename Vertices::const_iterator
 
using HalfEdgeConstIterator = typename HalfEdges::const_iterator
 
using FaceConstIterator = typename Faces::const_iterator
 
- Protected Member Functions inherited from pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >
void deleteFace (const FaceIndex &idx_face, std::true_type)
 Manifold version of deleteFace. More...
 
void deleteFace (const FaceIndex &idx_face, std::false_type)
 Non-manifold version of deleteFace. More...
 
bool isBoundary (const FaceIndex &idx_face, std::true_type) const
 Check if any vertex of the face lies on the boundary. More...
 
bool isBoundary (const FaceIndex &idx_face, std::false_type) const
 Check if any edge of the face lies on the boundary. More...
 
bool isManifold (const VertexIndex &, std::true_type) const
 Always manifold. More...
 
bool isManifold (const VertexIndex &idx_vertex, std::false_type) const
 Check if the given vertex is manifold. More...
 
bool isManifold (std::true_type) const
 Always manifold. More...
 
bool isManifold (std::false_type) const
 Check if all vertices in the mesh are manifold. More...
 
FaceIndex addFaceImplBase (const VertexIndices &vertices, const FaceData &face_data, const EdgeData &edge_data, const HalfEdgeData &half_edge_data)
 General implementation of addFace. More...
 
HalfEdgeIndex addEdge (const VertexIndex &idx_v_a, const VertexIndex &idx_v_b, const HalfEdgeData &he_data, const EdgeData &edge_data)
 Add an edge between the two given vertices and connect them with the vertices. More...
 
bool checkTopology1 (const VertexIndex &idx_v_a, const VertexIndex &idx_v_b, HalfEdgeIndex &idx_he_ab, std::vector< bool >::reference is_new_ab, std::true_type) const
 Check if the edge between the two vertices can be added. More...
 
bool checkTopology1 (const VertexIndex &idx_v_a, const VertexIndex &idx_v_b, HalfEdgeIndex &idx_he_ab, std::vector< bool >::reference is_new_ab, std::false_type) const
 Non manifold version of checkTopology1. More...
 
bool checkTopology2 (const HalfEdgeIndex &, const HalfEdgeIndex &, const bool is_new_ab, const bool is_new_bc, const bool is_isolated_b, std::vector< bool >::reference, HalfEdgeIndex &, std::true_type) const
 Check if the face may be added (mesh does not become non-manifold). More...
 
bool checkTopology2 (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const bool is_new_ab, const bool is_new_bc, const bool, std::vector< bool >::reference make_adjacent_ab_bc, HalfEdgeIndex &idx_free_half_edge, std::false_type) const
 Check if the half-edge bc is the next half-edge of ab. More...
 
void makeAdjacent (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, HalfEdgeIndex &idx_free_half_edge)
 Make the half-edges bc the next half-edge of ab. More...
 
FaceIndex connectFace (const HalfEdgeIndices &inner_he, const FaceData &face_data)
 Add a face to the mesh and connect it to the half-edges. More...
 
void connectPrevNext (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc)
 Connect the next and prev indices of the two half-edges with each other. More...
 
void connectNewNew (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const VertexIndex &idx_v_b, std::true_type)
 Both half-edges are new (manifold version). More...
 
void connectNewNew (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const VertexIndex &idx_v_b, std::false_type)
 Both half-edges are new (non-manifold version). More...
 
void connectNewOld (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const VertexIndex &idx_v_b)
 The first half-edge is new. More...
 
void connectOldNew (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const VertexIndex &idx_v_b)
 The second half-edge is new. More...
 
void connectOldOld (const HalfEdgeIndex &, const HalfEdgeIndex &, const VertexIndex &, std::true_type)
 Both half-edges are old (manifold version). More...
 
void connectOldOld (const HalfEdgeIndex &, const HalfEdgeIndex &idx_he_bc, const VertexIndex &idx_v_b, std::false_type)
 Both half-edges are old (non-manifold version). More...
 
void addData (pcl::PointCloud< DataT > &cloud, const DataT &data, std::true_type)
 Add mesh data. More...
 
void addData (pcl::PointCloud< DataT > &, const DataT &, std::false_type)
 Does nothing. More...
 
void reconnect (const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc, const bool is_boundary_ba, const bool is_boundary_cb)
 Deconnect the input half-edges from the mesh and adjust the indices of the connected half-edges. More...
 
void reconnectNBNB (const HalfEdgeIndex &idx_he_bc, const HalfEdgeIndex &idx_he_cb, const VertexIndex &idx_v_b, std::true_type)
 Both edges are not on the boundary. More...
 
void reconnectNBNB (const HalfEdgeIndex &idx_he_bc, const HalfEdgeIndex &, const VertexIndex &idx_v_b, std::false_type)
 Both edges are not on the boundary. More...
 
void markDeleted (const VertexIndex &idx_vertex)
 Mark the given vertex as deleted. More...
 
void markDeleted (const HalfEdgeIndex &idx_he)
 Mark the given half-edge as deleted. More...
 
void markDeleted (const EdgeIndex &idx_edge)
 Mark the given edge (both half-edges) as deleted. More...
 
void markDeleted (const FaceIndex &idx_face)
 Mark the given face as deleted. More...
 
IndexContainerT remove (ElementContainerT &elements, DataContainerT &data_cloud)
 Removes mesh elements and data that are marked as deleted from the container. More...
 
void incrementIf (IteratorT &it, std::true_type) const
 Increment the iterator. More...
 
void incrementIf (IteratorT &, std::false_type) const
 Does nothing. More...
 
void assignIf (const ConstIteratorT source, IteratorT target, std::true_type) const
 Assign the source iterator to the target iterator. More...
 
void assignIf (const ConstIteratorT, IteratorT, std::false_type) const
 Does nothing. More...
 
void setOutgoingHalfEdgeIndex (const VertexIndex &idx_vertex, const HalfEdgeIndex &idx_outgoing_half_edge)
 Set the outgoing half-edge index to a given vertex. More...
 
void setTerminatingVertexIndex (const HalfEdgeIndex &idx_half_edge, const VertexIndex &idx_terminating_vertex)
 Set the terminating vertex index to a given half-edge. More...
 
void setNextHalfEdgeIndex (const HalfEdgeIndex &idx_half_edge, const HalfEdgeIndex &idx_next_half_edge)
 Set the next half_edge index to a given half-edge. More...
 
void setPrevHalfEdgeIndex (const HalfEdgeIndex &idx_half_edge, const HalfEdgeIndex &idx_prev_half_edge)
 Set the previous half-edge index to a given half-edge. More...
 
void setFaceIndex (const HalfEdgeIndex &idx_half_edge, const FaceIndex &idx_face)
 Set the face index to a given half-edge. More...
 
void setInnerHalfEdgeIndex (const FaceIndex &idx_face, const HalfEdgeIndex &idx_inner_half_edge)
 Set the inner half-edge index to a given face. More...
 
void reserveData (DataCloudT &cloud, const std::size_t n, std::true_type) const
 Reserve storage space for the mesh data. More...
 
void reserveData (DataCloudT &, const std::size_t, std::false_type) const
 Does nothing. More...
 
void resizeData (DataCloudT &data_cloud, const std::size_t n, const typename DataCloudT::value_type &data, std::true_type) const
 Resize the mesh data. More...
 
void resizeData (DataCloudT &, const std::size_t, const typename DataCloudT::value_type &, std::false_type) const
 Does nothing. More...
 
void clearData (DataCloudT &cloud, std::true_type) const
 Clear the mesh data. More...
 
void clearData (DataCloudT &, std::false_type) const
 Does nothing. More...
 
VertexgetVertex (const VertexIndex &idx_vertex)
 Get the vertex for the given index. More...
 
Vertex getVertex (const VertexIndex &idx_vertex) const
 Get the vertex for the given index. More...
 
void setVertex (const VertexIndex &idx_vertex, const Vertex &vertex)
 Set the vertex at the given index. More...
 
HalfEdgegetHalfEdge (const HalfEdgeIndex &idx_he)
 Get the half-edge for the given index. More...
 
HalfEdge getHalfEdge (const HalfEdgeIndex &idx_he) const
 Get the half-edge for the given index. More...
 
void setHalfEdge (const HalfEdgeIndex &idx_he, const HalfEdge &half_edge)
 Set the half-edge at the given index. More...
 
FacegetFace (const FaceIndex &idx_face)
 Get the face for the given index. More...
 
Face getFace (const FaceIndex &idx_face) const
 Get the face for the given index. More...
 
void setFace (const FaceIndex &idx_face, const Face &face)
 Set the face at the given index. More...
 

Detailed Description

template<class MeshTraitsT>
class pcl::geometry::PolygonMesh< MeshTraitsT >

General half-edge mesh that can store any polygon with a minimum number of vertices of 3.

Template Parameters
MeshTraitsTPlease have a look at pcl::geometry::DefaultMeshTraits.
Author
Martin Saelzle

Definition at line 60 of file polygon_mesh.h.

Member Typedef Documentation

◆ Base

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::Base = pcl::geometry::MeshBase<PolygonMesh<MeshTraitsT>, MeshTraitsT, PolygonMeshTag>

Definition at line 64 of file polygon_mesh.h.

◆ ConstPtr

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::ConstPtr = shared_ptr<const Self>

Definition at line 69 of file polygon_mesh.h.

◆ EdgeData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::EdgeData = typename Base::EdgeData

Definition at line 73 of file polygon_mesh.h.

◆ EdgeDataCloud

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::EdgeDataCloud = typename Base::EdgeDataCloud

Definition at line 85 of file polygon_mesh.h.

◆ EdgeIndex

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::EdgeIndex = typename Base::EdgeIndex

Definition at line 91 of file polygon_mesh.h.

◆ EdgeIndices

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::EdgeIndices = typename Base::EdgeIndices

Definition at line 96 of file polygon_mesh.h.

◆ FaceAroundFaceCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceAroundFaceCirculator = typename Base::FaceAroundFaceCirculator

Definition at line 111 of file polygon_mesh.h.

◆ FaceAroundVertexCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceAroundVertexCirculator = typename Base::FaceAroundVertexCirculator

Definition at line 105 of file polygon_mesh.h.

◆ FaceData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceData = typename Base::FaceData

Definition at line 74 of file polygon_mesh.h.

◆ FaceDataCloud

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceDataCloud = typename Base::FaceDataCloud

Definition at line 86 of file polygon_mesh.h.

◆ FaceIndex

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceIndex = typename Base::FaceIndex

Definition at line 92 of file polygon_mesh.h.

◆ FaceIndices

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::FaceIndices = typename Base::FaceIndices

Definition at line 97 of file polygon_mesh.h.

◆ HalfEdgeData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HalfEdgeData = typename Base::HalfEdgeData

Definition at line 72 of file polygon_mesh.h.

◆ HalfEdgeDataCloud

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HalfEdgeDataCloud = typename Base::HalfEdgeDataCloud

Definition at line 84 of file polygon_mesh.h.

◆ HalfEdgeIndex

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HalfEdgeIndex = typename Base::HalfEdgeIndex

Definition at line 90 of file polygon_mesh.h.

◆ HalfEdgeIndices

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HalfEdgeIndices = typename Base::HalfEdgeIndices

Definition at line 95 of file polygon_mesh.h.

◆ HasEdgeData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HasEdgeData = typename Base::HasEdgeData

Definition at line 80 of file polygon_mesh.h.

◆ HasFaceData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HasFaceData = typename Base::HasFaceData

Definition at line 81 of file polygon_mesh.h.

◆ HasHalfEdgeData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HasHalfEdgeData = typename Base::HasHalfEdgeData

Definition at line 79 of file polygon_mesh.h.

◆ HasVertexData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::HasVertexData = typename Base::HasVertexData

Definition at line 78 of file polygon_mesh.h.

◆ IncomingHalfEdgeAroundVertexCirculator

Definition at line 103 of file polygon_mesh.h.

◆ InnerHalfEdgeAroundFaceCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::InnerHalfEdgeAroundFaceCirculator = typename Base::InnerHalfEdgeAroundFaceCirculator

Definition at line 107 of file polygon_mesh.h.

◆ IsManifold

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::IsManifold = typename Base::IsManifold

Definition at line 75 of file polygon_mesh.h.

◆ MeshTag

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::MeshTag = typename Base::MeshTag

Definition at line 76 of file polygon_mesh.h.

◆ OuterHalfEdgeAroundFaceCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::OuterHalfEdgeAroundFaceCirculator = typename Base::OuterHalfEdgeAroundFaceCirculator

Definition at line 109 of file polygon_mesh.h.

◆ OutgoingHalfEdgeAroundVertexCirculator

Definition at line 101 of file polygon_mesh.h.

◆ Ptr

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::Ptr = shared_ptr<Self>

Definition at line 68 of file polygon_mesh.h.

◆ Self

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::Self = PolygonMesh<MeshTraitsT>

Definition at line 67 of file polygon_mesh.h.

◆ VertexAroundFaceCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexAroundFaceCirculator = typename Base::VertexAroundFaceCirculator

Definition at line 106 of file polygon_mesh.h.

◆ VertexAroundVertexCirculator

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexAroundVertexCirculator = typename Base::VertexAroundVertexCirculator

Definition at line 100 of file polygon_mesh.h.

◆ VertexData

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexData = typename Base::VertexData

Definition at line 71 of file polygon_mesh.h.

◆ VertexDataCloud

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexDataCloud = typename Base::VertexDataCloud

Definition at line 83 of file polygon_mesh.h.

◆ VertexIndex

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexIndex = typename Base::VertexIndex

Definition at line 89 of file polygon_mesh.h.

◆ VertexIndices

template<class MeshTraitsT >
using pcl::geometry::PolygonMesh< MeshTraitsT >::VertexIndices = typename Base::VertexIndices

Definition at line 94 of file polygon_mesh.h.

Constructor & Destructor Documentation

◆ PolygonMesh()

template<class MeshTraitsT >
pcl::geometry::PolygonMesh< MeshTraitsT >::PolygonMesh ( )
inline

Constructor.

Definition at line 114 of file polygon_mesh.h.

Member Function Documentation

◆ addFace() [1/2]

template<class MeshTraitsT >
FaceIndex pcl::geometry::PolygonMesh< MeshTraitsT >::addFace ( const VertexIndex idx_v_0,
const VertexIndex idx_v_1,
const VertexIndex idx_v_2,
const FaceData face_data = FaceData(),
const EdgeData edge_data = EdgeData(),
const HalfEdgeData half_edge_data = HalfEdgeData() 
)
inline

Add a triangle to the mesh.

Data is only added if it is associated with the elements. The last vertex is connected with the first one.

Parameters
[in]idx_v_0Index to the first vertex.
[in]idx_v_1Index to the second vertex.
[in]idx_v_2Index to the third vertex.
[in]face_dataData that is set for the face.
[in]half_edge_dataData that is set for all added half-edges.
[in]edge_dataData that is set for all added edges.
Returns
Index to the new face. Failure is signaled by returning an invalid face index.
Warning
The vertices must be valid and unique (each vertex may be contained only once). Not complying with this requirement results in undefined behavior!

Definition at line 135 of file polygon_mesh.h.

References pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >::addFaceImplBase().

◆ addFace() [2/2]

template<class MeshTraitsT >
FaceIndex pcl::geometry::PolygonMesh< MeshTraitsT >::addFace ( const VertexIndex idx_v_0,
const VertexIndex idx_v_1,
const VertexIndex idx_v_2,
const VertexIndex idx_v_3,
const FaceData face_data = FaceData(),
const EdgeData edge_data = EdgeData(),
const HalfEdgeData half_edge_data = HalfEdgeData() 
)
inline

Add a quad to the mesh.

Data is only added if it is associated with the elements. The last vertex is connected with the first one.

Parameters
[in]idx_v_0Index to the first vertex.
[in]idx_v_1Index to the second vertex.
[in]idx_v_2Index to the third vertex.
[in]idx_v_3Index to the fourth vertex.
[in]face_dataData that is set for the face.
[in]half_edge_dataData that is set for all added half-edges.
[in]edge_dataData that is set for all added edges.
Returns
Index to the new face. Failure is signaled by returning an invalid face index.
Warning
The vertices must be valid and unique (each vertex may be contained only once). Not complying with this requirement results in undefined behavior!

Definition at line 164 of file polygon_mesh.h.

References pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, PolygonMeshTag >::addFaceImplBase().

Friends And Related Function Documentation

◆ pcl::geometry::MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, pcl::geometry::PolygonMeshTag >

template<class MeshTraitsT >
friend class pcl::geometry:: MeshBase< PolygonMesh< MeshTraitsT >, MeshTraitsT, pcl::geometry::PolygonMeshTag >
friend

Definition at line 164 of file polygon_mesh.h.


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