CGAL 6.1.1 - Shape Detection

Loading...
Searching...
No Matches
List of all members | Public Types
CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query< PolygonMesh > Class Template Reference
Reference Manual » Region Growing » Polygon Mesh

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

## Definition

template<typename PolygonMesh>
class CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query< PolygonMesh >

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

  PolygonMesh | a model of `FaceListGraph`
  FaceRange | a 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.

## Access
void | operator() (const Item query, std::vector< Item > &neighbors) const
| implements `NeighborQuery::operator()()`.

## 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

  pmesh | an 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

  query | `Item` of the query face
  neighbors | `Items` of faces, which are neighbors of the query face

Precondition
  `query_index < faces(pmesh).size()`