Template Function lvr2::calcLocalVertexNeighborhood

Function Documentation

template<typename BaseVecT>
void lvr2::calcLocalVertexNeighborhood(const BaseMesh<BaseVecT> &mesh, VertexHandle vH, double radius, vector<VertexHandle> &neighborsOut)

Calculates the local neighborhood of a given vertex (defined by it’s handle).

A local neighborhood for a vertex is constrained by a circular-shaped radius. The neighbors of a vertex do have to be connected by vertices and edges, which stay within this border. If one edge leaves the neighborhood radius, every further on connected vertex and edge isn’t part of the local neighborhood, even if the topological “edge->vertex->edge->vertex->…”-chain, which left the radius once, reenters the radius.

Parameters:
  • mesh – The given BaseMesh for performing the neighborhood-search.

  • vH – The given VertexHandle to which we want to get the local heighborhood.

  • radius – The radius which defines the border of the local neighborhood.

  • neighborsOut – The found neighbors, stored in a vector.