CGAL 5.6.1 - Shape Detection
CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query< PolygonMesh > Class Template Reference

#include <CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h>

Definition

Edge-adjacent faces connectivity in a polygon mesh.

This class returns all faces, which are edge-adjacent to a query face in a polygon mesh being a PolygonMesh.

Template Parameters
PolygonMesha model of FaceListGraph
FaceRangea model of ConstRange whose iterator type is RandomAccessIterator and value type is the face type of a polygon mesh
Is Model Of:
NeighborQuery
Examples:
Shape_detection/region_growing_lines_on_segment_set.cpp, and Shape_detection/region_growing_planes_on_polygon_mesh.cpp.

Public Types

using Item = typename boost::graph_traits< PolygonMesh >::face_descriptor
 Item type.
 
using Region = std::vector< Item >
 

Initialization

 One_ring_neighbor_query (const PolygonMesh &pmesh)
 initializes all internal data structures. More...
 

Access

void operator() (const Item query, std::vector< Item > &neighbors) const
 implements NeighborQuery::operator()(). More...
 

Constructor & Destructor Documentation

◆ One_ring_neighbor_query()

template<typename PolygonMesh >
CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query< PolygonMesh >::One_ring_neighbor_query ( const PolygonMesh &  pmesh)

initializes all internal data structures.

Parameters
pmeshan instance of a PolygonMesh that represents a polygon mesh
Precondition
faces(pmesh).size() > 0

Member Function Documentation

◆ operator()()

template<typename PolygonMesh >
void CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query< PolygonMesh >::operator() ( const Item  query,
std::vector< Item > &  neighbors 
) const

implements NeighborQuery::operator()().

This operator retrieves all faces, which are edge-adjacent to the face query. These Items are returned in neighbors.

Parameters
queryItem of the query face
neighborsItems of faces, which are neighbors of the query face
Precondition
query_index < faces(pmesh).size()