Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEOGen::RestrictedVoronoiDiagram< DIM >::TetrahedronAction< ACTION > Class Template Reference

Adapter class used internally to implement for_each_tetrahedron() More...

#include <geogram/voronoi/generic_RVD.h>

Public Member Functions

 TetrahedronAction (const ACTION &do_it)
 Creates a new TetrahedronAction that wraps a user ACTION instance. More...
 
void operator() (index_t v, index_t t, const Polyhedron &C) const
 Callback called for each polyhedron. More...
 

Protected Member Functions

bool facet_is_incident_to_vertex (const Polyhedron &C, Polyhedron::Corner &c, index_t t) const
 Tests whether a Polyhedron facet is incident to a vertex. More...
 

Protected Attributes

const ACTION & do_it_
 

Detailed Description

template<index_t DIM>
template<class ACTION>
class GEOGen::RestrictedVoronoiDiagram< DIM >::TetrahedronAction< ACTION >

Adapter class used internally to implement for_each_tetrahedron()

Overrides constness checks, to allow using temporaries as argument of for_each_xxx()

Template Parameters
ACTIONthe user action class. It needs to implement: operator()(index_t v, signed_index_t v_adj, index_t t, index_t t_adj, const Vertex& v0, const Vertex& v1, const Vertex& v2, const Vertex& v3 ) where the parameters are as follows:
  • v is the index of the current Voronoi cell (or Delaunay vertex)
  • v_adj is the index of the Voronoi cell adjacent to t accros facet (v1, v2, v3) or -1 if it does not exists adjacent to v or -1 if current face is a tetrahedron facet
  • t is the index of the current tetrahedron
  • t_adj is the index of the tetrahedron adjacent to t accros facet (v1, v2, v3) or -1 if it does not exists
  • v0,v1,v2 and v3 are the four vertices of tetrahedron.

Definition at line 883 of file generic_RVD.h.

Constructor & Destructor Documentation

◆ TetrahedronAction()

template<index_t DIM>
template<class ACTION >
GEOGen::RestrictedVoronoiDiagram< DIM >::TetrahedronAction< ACTION >::TetrahedronAction ( const ACTION &  do_it)
inline

Creates a new TetrahedronAction that wraps a user ACTION instance.

Parameters
[in]do_itthe user ACTION instance

Definition at line 890 of file generic_RVD.h.

Member Function Documentation

◆ facet_is_incident_to_vertex()

template<index_t DIM>
template<class ACTION >
bool GEOGen::RestrictedVoronoiDiagram< DIM >::TetrahedronAction< ACTION >::facet_is_incident_to_vertex ( const Polyhedron C,
Polyhedron::Corner c,
index_t  t 
) const
inlineprotected

Tests whether a Polyhedron facet is incident to a vertex.

Parameters
[in]Cthe Polyhedron
[in]ca corner of the facet
[in]tthe index of the vertex in dual form (in other words, a triangle index).
Returns
true if the facet incident to corner c is also incident to the vertex dual to t, false otherwise

Definition at line 994 of file generic_RVD.h.

◆ operator()()

template<index_t DIM>
template<class ACTION >
void GEOGen::RestrictedVoronoiDiagram< DIM >::TetrahedronAction< ACTION >::operator() ( index_t  v,
index_t  t,
const Polyhedron C 
) const
inline

Callback called for each polyhedron.

Routes the callback to the wrapped user action class.

Parameters
[in]vindex of current Delaunay seed
[in]tindex of current mesh tetrahedron
[in]Cintersection between current mesh tetrahedron and the Voronoi cell of v

Definition at line 905 of file generic_RVD.h.


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