41 #ifndef PCL_GEOMETRY_GET_BOUNDARY_H
42 #define PCL_GEOMETRY_GET_BOUNDARY_H
57 template <
class MeshT>
void
59 std::vector <typename MeshT::HalfEdgeIndices>& boundary_he_collection,
60 const size_t expected_size = 3)
64 typedef typename Mesh::HalfEdgeIndices HalfEdgeIndices;
65 typedef typename Mesh::InnerHalfEdgeAroundFaceCirculator IHEAFC;
67 boundary_he_collection.clear ();
69 HalfEdgeIndices boundary_he; boundary_he.reserve (expected_size);
70 std::vector <bool> visited (mesh.sizeEdges (),
false);
71 IHEAFC circ, circ_end;
73 for (HalfEdgeIndex i (0); i<HalfEdgeIndex (mesh.sizeHalfEdges ()); ++i)
79 circ = mesh.getInnerHalfEdgeAroundFaceCirculator (i);
84 boundary_he.push_back (circ.getTargetIndex ());
85 }
while (++circ != circ_end);
87 boundary_he_collection.push_back (boundary_he);
95 #endif // PCL_GEOMETRY_GET_BOUNDARY_H
This file defines compatibility wrappers for low level I/O functions.
int get() const
Get the index.
pcl::geometry::EdgeIndex toEdgeIndex(const HalfEdgeIndex &index)
Convert the given half-edge index to an edge index.
void getBoundBoundaryHalfEdges(const MeshT &mesh, std::vector< typename MeshT::HalfEdgeIndices > &boundary_he_collection, const size_t expected_size=3)
Get a collection of boundary half-edges for the input mesh.
Index used to access elements in the half-edge mesh.