Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEO::MeshSurfaceIntersection::RadialBundles Class Reference

Represents the set of radial halfedge bundles. More...

#include <geogram/mesh/mesh_surface_intersection.h>

Public Types

typedef std::pair< index_t, index_tChartPos
 Indicates where to find a chart in a bundle. More...
 

Public Member Functions

 RadialBundles (MeshSurfaceIntersection &I)
 RadialBundles constructor. More...
 
void initialize ()
 Initializes the structure. More...
 
index_t nb () const
 Gets the number of bundles.
 
index_as_iterator begin () const
 used by range-based for More...
 
index_as_iterator end () const
 used by range-based for More...
 
index_t nb_halfedges (index_t bndl) const
 Gets the number of halfedges in a bundle. More...
 
index_t halfedge (index_t bndl, index_t li) const
 Gets a halfedge in a bundle from local index. More...
 
void set_halfedge (index_t bndl, index_t li, index_t h)
 Sets a halfedge in a bundle. More...
 
index_ptr_range halfedges (index_t bndl)
 gets the halfedges in a bundle More...
 
const_index_ptr_range halfedges (index_t bndl) const
 gets the halfedges in a bundle More...
 
index_t vertex (index_t bndl, index_t lv) const
 gets one of the vertices at the two extremities of a bundle More...
 
index_t vertex_first_bundle (index_t v) const
 gets the first bundle starting from a vertex More...
 
index_t next_around_vertex (index_t bndl) const
 gets the next bundle around a vertex More...
 
index_t nb_bundles_around_vertex (index_t v) const
 gets the bumber of bundles around a vertex More...
 
index_t opposite (index_t bndl)
 gets the opposite bundle More...
 
index_t prev_along_polyline (index_t bndl)
 gets the predecessor of a bundle along its polyline More...
 
index_t next_along_polyline (index_t bndl)
 gets the successor of a bundle along its polyline More...
 
bool radial_sort (index_t bndl, RadialSort &RS)
 Sorts the halfedges of the bundle in-place. More...
 
void set_sorted_halfedges (index_t bndl, const vector< index_t > &halfedges)
 Sets the halfedges of a bundle. More...
 
void get_sorted_incident_charts (index_t bndl, vector< ChartPos > &chart_pos)
 Gets the sorted list of charts around bundle. More...
 
bool is_sorted (index_t bndl) const
 

Public Attributes

MeshSurfaceIntersectionI_
 
Meshmesh_
 
Attribute< index_tfacet_chart_
 
vector< index_tH_
 
vector< index_tbndl_start_
 
vector< index_tv_first_bndl_
 
vector< index_tbndl_next_around_v_
 
vector< bool > bndl_is_sorted_
 

Detailed Description

Represents the set of radial halfedge bundles.

A Radial bundle corresponds to the set of halfedges connecting the same pair of vertices (and in the same order).

Definition at line 756 of file mesh_surface_intersection.h.

Member Typedef Documentation

◆ ChartPos

Indicates where to find a chart in a bundle.

the first index is a chart index, and the second index indicates which halfedge in a bundle is incident to that chart.

Definition at line 1008 of file mesh_surface_intersection.h.

Constructor & Destructor Documentation

◆ RadialBundles()

GEO::MeshSurfaceIntersection::RadialBundles::RadialBundles ( MeshSurfaceIntersection I)
inline

RadialBundles constructor.

Parameters
[in]Ia reference to the MeshSurfaceIntersectionx

Definition at line 763 of file mesh_surface_intersection.h.

Member Function Documentation

◆ begin()

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

used by range-based for

Returns
a non-iterator corresponding to the first bundle

Definition at line 783 of file mesh_surface_intersection.h.

◆ end()

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

used by range-based for

Returns
a non-iterator to one position past the last bundle

Definition at line 791 of file mesh_surface_intersection.h.

◆ get_sorted_incident_charts()

void GEO::MeshSurfaceIntersection::RadialBundles::get_sorted_incident_charts ( index_t  bndl,
vector< ChartPos > &  chart_pos 
)

Gets the sorted list of charts around bundle.

Parameters
[in]bndla bundle
[out]chart_posa list of (chart id, halfedge index) couples, sorted by chart id, and where the halfedge index is the original index in the bundle before sorting

◆ halfedge()

index_t GEO::MeshSurfaceIntersection::RadialBundles::halfedge ( index_t  bndl,
index_t  li 
) const
inline

Gets a halfedge in a bundle from local index.

Parameters
[in]bndlthe bundle
[in]lithe local index of the halfedge in the bundle, in [0 .. nb_halfedges(bndl)-1]
Returns
the halfedge

Definition at line 812 of file mesh_surface_intersection.h.

◆ halfedges() [1/2]

index_ptr_range GEO::MeshSurfaceIntersection::RadialBundles::halfedges ( index_t  bndl)
inline

gets the halfedges in a bundle

Parameters
[in]bndlbundle index
Returns
a modifiable sequence of halfedge indices

Definition at line 836 of file mesh_surface_intersection.h.

◆ halfedges() [2/2]

const_index_ptr_range GEO::MeshSurfaceIntersection::RadialBundles::halfedges ( index_t  bndl) const
inline

gets the halfedges in a bundle

Parameters
[in]bndlbundle index
Returns
a non-modifiable sequence of halfedge indices

Definition at line 847 of file mesh_surface_intersection.h.

◆ initialize()

void GEO::MeshSurfaceIntersection::RadialBundles::initialize ( )

Initializes the structure.

Needs to be called before any other function

◆ nb_bundles_around_vertex()

index_t GEO::MeshSurfaceIntersection::RadialBundles::nb_bundles_around_vertex ( index_t  v) const
inline

gets the bumber of bundles around a vertex

Parameters
[in]vthe vertex
Returns
the number of bundles starting from v

Definition at line 893 of file mesh_surface_intersection.h.

◆ nb_halfedges()

index_t GEO::MeshSurfaceIntersection::RadialBundles::nb_halfedges ( index_t  bndl) const
inline

Gets the number of halfedges in a bundle.

Parameters
[in]bndlthe bundle
Returns
the number of halfedges in bndl

Definition at line 800 of file mesh_surface_intersection.h.

◆ next_along_polyline()

index_t GEO::MeshSurfaceIntersection::RadialBundles::next_along_polyline ( index_t  bndl)
inline

gets the successor of a bundle along its polyline

Returns
the bundle originated at the destination vertex if it exists and is unique, NO_INDEX otherwise

Definition at line 942 of file mesh_surface_intersection.h.

◆ next_around_vertex()

index_t GEO::MeshSurfaceIntersection::RadialBundles::next_around_vertex ( index_t  bndl) const
inline

gets the next bundle around a vertex

Parameters
[in]bndlthe bundle

bundles starting from the same vertex are chained

Returns
the index of the next bundle that has the same origin vertex as bndl, or NO_INDEX if there is no such bundle

Definition at line 884 of file mesh_surface_intersection.h.

◆ opposite()

index_t GEO::MeshSurfaceIntersection::RadialBundles::opposite ( index_t  bndl)
inline

gets the opposite bundle

Parameters
[in]bndla bundle index
Returns
the bundle connecting the same vertices as a given bundle but in the reverse order

Definition at line 911 of file mesh_surface_intersection.h.

◆ prev_along_polyline()

index_t GEO::MeshSurfaceIntersection::RadialBundles::prev_along_polyline ( index_t  bndl)
inline

gets the predecessor of a bundle along its polyline

Returns
the bundle arriving at the source vertex if it exists and is unique, NO_INDEX otherwise

Definition at line 921 of file mesh_surface_intersection.h.

◆ radial_sort()

bool GEO::MeshSurfaceIntersection::RadialBundles::radial_sort ( index_t  bndl,
RadialSort RS 
)
inline

Sorts the halfedges of the bundle in-place.

Parameters
[in]bndlthe bundle
[in]RSa RadialSort structure (that caches some information)
Return values
trueif radial sort was successful
falseotherwise (may happen with expansion_nt)

Definition at line 966 of file mesh_surface_intersection.h.

◆ set_halfedge()

void GEO::MeshSurfaceIntersection::RadialBundles::set_halfedge ( index_t  bndl,
index_t  li,
index_t  h 
)
inline

Sets a halfedge in a bundle.

Parameters
[in]bndlthe bundle
[in]lithe local index of the halfedge in the bunble, in [0 .. nb_halfedges(bndl)-1]
[in]hthe new halfedge

Definition at line 825 of file mesh_surface_intersection.h.

◆ set_sorted_halfedges()

void GEO::MeshSurfaceIntersection::RadialBundles::set_sorted_halfedges ( index_t  bndl,
const vector< index_t > &  halfedges 
)
inline

Sets the halfedges of a bundle.

Used when radial sorting can be replaced with combinatorial propagation.

Parameters
[in]bndla bundle
[in]halfedgesthe sorted list of the halfedges in the bundle

Definition at line 993 of file mesh_surface_intersection.h.

◆ vertex()

index_t GEO::MeshSurfaceIntersection::RadialBundles::vertex ( index_t  bndl,
index_t  lv 
) const
inline

gets one of the vertices at the two extremities of a bundle

Parameters
[in]bndlbundle index
[in]lvlocal vertex index, in {0,1}
Returns
if lv = 0 the source vertex, if lv = 1 the destination vertex

Definition at line 860 of file mesh_surface_intersection.h.

◆ vertex_first_bundle()

index_t GEO::MeshSurfaceIntersection::RadialBundles::vertex_first_bundle ( index_t  v) const
inline

gets the first bundle starting from a vertex

Parameters
[in]vthe vertex

bundles starting from the same vertex are chained

Returns
the index of the first bundle starting from v, or NO_INDEX if there is no such bundle

Definition at line 873 of file mesh_surface_intersection.h.


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