Graphite  Version 3
An experimental 3D geometry processing program
GEO::MeshSurfaceIntersection::Halfedges Class Reference

Halfedfge-like API wrappers on top of a triangulated mesh. More...

#include <geogram/mesh/mesh_surface_intersection.h>

Public Member Functions

 Halfedges (MeshSurfaceIntersection &I)
 Halfedges constructor. More...
 
 ~Halfedges ()
 Halfedges destructor.
 
void initialize ()
 Initializes the structure. More...
 
index_t nb () const
 Gets the number of halfedegs in the map. More...
 
index_as_iterator begin () const
 used by range-based for More...
 
index_as_iterator end () const
 used by range-based for More...
 
index_t facet (index_t h) const
 Gets the facet associated to a halfedge. More...
 
index_t alpha2 (index_t h) const
 gets the surfacic neighbor of a halfedge More...
 
index_t alpha3 (index_t h) const
 gets the volumetric neighbor of a halfedge More...
 
index_t facet_alpha3 (index_t f) const
 gets the volumetric neighbor of a facet More...
 
index_t vertex (index_t h, index_t dlv) const
 gets a vertex of an halfedge More...
 
void sew2 (index_t h1, index_t h2)
 Creates a surfacic link between two halfedges. More...
 
void sew3 (index_t h1, index_t h2)
 Creates a volumetric link between two halfedges. More...
 

Detailed Description

Halfedfge-like API wrappers on top of a triangulated mesh.

These are volumetric halfedges, also called combinatorial 3-map, with both volumetric links (alpha3) and surfacic link (alpha2). One may refer to this webpage for the definition of a 3-map: https://doc.cgal.org/latest/Combinatorial_map/

Definition at line 588 of file mesh_surface_intersection.h.

Constructor & Destructor Documentation

◆ Halfedges()

GEO::MeshSurfaceIntersection::Halfedges::Halfedges ( MeshSurfaceIntersection I)
inline

Halfedges constructor.

Parameters
[in]Ia reference to the MeshSurfaceIntersection

Definition at line 595 of file mesh_surface_intersection.h.

Member Function Documentation

◆ alpha2()

index_t GEO::MeshSurfaceIntersection::Halfedges::alpha2 ( index_t  h) const
inline

gets the surfacic neighbor of a halfedge

see definition of a combinatorial 3-map here: https://doc.cgal.org/latest/Combinatorial_map/

Parameters
[in]ha halfedge index
Returns
another halfedge in the same surface, connecting the same vertices as h, but in opposite order
See also
sew2()

Definition at line 658 of file mesh_surface_intersection.h.

◆ alpha3()

index_t GEO::MeshSurfaceIntersection::Halfedges::alpha3 ( index_t  h) const
inline

gets the volumetric neighbor of a halfedge

see definition of a combinatorial 3-map here: https://doc.cgal.org/latest/Combinatorial_map/

Parameters
[in]ha halfedge index
Returns
another halfedge in a different volume, connecting the same vertices as h, but in opposite order
See also
sew3()

Definition at line 681 of file mesh_surface_intersection.h.

◆ begin()

index_as_iterator GEO::MeshSurfaceIntersection::Halfedges::begin ( ) const
inline

used by range-based for

Returns
a non-iterator corresponding to the first index.

Definition at line 628 of file mesh_surface_intersection.h.

◆ end()

index_as_iterator GEO::MeshSurfaceIntersection::Halfedges::end ( ) const
inline

used by range-based for

Returns
a non-iterator to one position past the last index.

Definition at line 636 of file mesh_surface_intersection.h.

◆ facet()

index_t GEO::MeshSurfaceIntersection::Halfedges::facet ( index_t  h) const
inline

Gets the facet associated to a halfedge.

Parameters
[in]ha halfedge index
Returns
the facet index, that is, h/3

Definition at line 645 of file mesh_surface_intersection.h.

◆ facet_alpha3()

index_t GEO::MeshSurfaceIntersection::Halfedges::facet_alpha3 ( index_t  f) const
inline

gets the volumetric neighbor of a facet

Parameters
[in]fa facet
Returns
a facet with the same vertices as f but in opposite index

Definition at line 691 of file mesh_surface_intersection.h.

◆ initialize()

void GEO::MeshSurfaceIntersection::Halfedges::initialize ( )
inline

Initializes the structure.

Needs to be called before any other function

Definition at line 609 of file mesh_surface_intersection.h.

◆ nb()

index_t GEO::MeshSurfaceIntersection::Halfedges::nb ( ) const
inline

Gets the number of halfedegs in the map.

Returns
the number of halfedges, that is, three times the number of triangles (halfedges are not stored explicitly).

Definition at line 620 of file mesh_surface_intersection.h.

◆ sew2()

void GEO::MeshSurfaceIntersection::Halfedges::sew2 ( index_t  h1,
index_t  h2 
)
inline

Creates a surfacic link between two halfedges.

Parameters
[in]h1,h2the two halfedges to be connected
Precondition
h1 and h2 should have the same origins and destinations but in reverse order (h1 's origin should be h2 's destination and vice-versa).
See also
alpha2()

Definition at line 720 of file mesh_surface_intersection.h.

◆ sew3()

void GEO::MeshSurfaceIntersection::Halfedges::sew3 ( index_t  h1,
index_t  h2 
)
inline

Creates a volumetric link between two halfedges.

Parameters
[in]h1,h2the two halfedges to be connected
Precondition
h1 and h2 should have the same origins and destinations but in reverse order (h1 's origin should be h2 's destination and vice-versa).
See also
alpha3()

Definition at line 737 of file mesh_surface_intersection.h.

◆ vertex()

index_t GEO::MeshSurfaceIntersection::Halfedges::vertex ( index_t  h,
index_t  dlv 
) const
inline

gets a vertex of an halfedge

Parameters
[in]hthe halfedge
[in]dlvthe local index of the vertex, in {0,1,2}
Returns
  • if dlv = 0 returns the origin vertex of h
  • if dlv = 1 returns the destination vertex of h
  • if dlv = 2 returns the vertex of the facet adjacent to h that is neither the origin nor the destination of h

Definition at line 705 of file mesh_surface_intersection.h.


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