Graphite  Version 3
An experimental 3D geometry processing program
GEOGen::SymbolicVertex Class Reference

A set of three integers that encodes the equation of a vertex in GenericVoronoiDiagram. More...

#include <geogram/voronoi/generic_RVD_vertex.h>

Inheritance diagram for GEOGen::SymbolicVertex:
GEOGen::small_set< GEO::signed_index_t, 3 >

Public Member Functions

 SymbolicVertex ()
 Creates an uninitialized SymbolicVertex.
 
void add_bisector (index_t i)
 Adds a bisector to the symbolic representation.
 
void add_boundary_facet (index_t i)
 Adds a boundary facet to the symbolic representation.
 
index_t nb_boundary_facets () const
 Gets the number of boundary facets in the symbolic representation.
 
index_t nb_bisectors () const
 Gets the number of bisectors in the symbolic representation.
 
index_t bisector (signed_index_t i) const
 Gets a bisector. More...
 
index_t boundary_facet (signed_index_t i) const
 Gets a boundary facet. More...
 
bool has_bisector (index_t i) const
 Tests whether a bisector is present in the symbolic representation this vertex. More...
 
bool has_boundary_facet (index_t i) const
 Tests whether a boundary facet is present in the symbolic representation of this vertex. More...
 
index_t get_boundary_vertex () const
 Gets the global index of the boundary vertex that corresponds to this vertex. More...
 
void get_boundary_edge (index_t &v1, index_t &v2) const
 Gets the global indices of the boundary vertices that define the boundary edge on which this vertex is located. More...
 
void set_boundary_vertex (index_t v)
 Sets the boundary vertex on which this vertex is located. More...
 
void set_boundary_edge (index_t v1, index_t v2)
 Sets the boundary edge on which this vertex is located. More...
 
void copy_boundary_edge_from (const thisclass &rhs)
 Copies a boundary edge from the symbolic representation of another vertex.
 
bool intersect_symbolic (const thisclass &v1, const thisclass &v2, index_t E)
 Computes the symbolic representation of the intersection between a segment and a bisector. More...
 
- Public Member Functions inherited from GEOGen::small_set< GEO::signed_index_t, 3 >
 small_set ()
 Constructs an empty small_set.
 
index_t size () const
 Gets the number of element in this small_set.
 
index_t capacity () const
 Gets the maximum number of elements that can be stored in this small_set.
 
iterator begin ()
 Gets an iterator to the first element.
 
const_iterator begin () const
 Gets a const iterator to the first element..
 
iterator end ()
 Gets an iterator one position past the last element.
 
const_iterator end () const
 Gets a const iterator one position past the last element.
 
iterator end_of_storage ()
 Gets an iterator one position past the last element that can be stored.
 
const_iterator end_of_storage () const
 Gets a const iterator one position past the last element that can be stored.
 
iterator insert (const GEO::signed_index_t &x)
 Insert a new element. More...
 
iterator insert (const GEO::signed_index_t &x, iterator where)
 Inserts a new element at a specified location.. More...
 
void clear ()
 Clears this small_set.
 
iterator find (const GEO::signed_index_t &x)
 Finds an element by value. More...
 
const_iterator find (const GEO::signed_index_t &x) const
 Finds an element by value. More...
 
void push_back (const GEO::signed_index_t &x)
 Appends an element to the end of the list. More...
 
void print (std::ostream &out) const
 Displays the stored elements.
 
GEO::signed_index_toperator[] (signed_index_t i)
 Direct access to an element. More...
 
const GEO::signed_index_toperator[] (signed_index_t i) const
 Direct access to an element. More...
 

Static Public Member Functions

static index_t to_unsigned_int (signed_index_t x)
 Casts a signed_index_t into an (unsigned) index_t. More...
 

Additional Inherited Members

- Public Types inherited from GEOGen::small_set< GEO::signed_index_t, 3 >
typedef GEO::signed_index_titerator
 A random access iterator to elements

 
typedef const GEO::signed_index_tconst_iterator
 A random access iterator to const elements.
 
typedef GEO::signed_index_treference
 Reference to element.
 
typedef GEO::signed_index_t value_type
 Type of the elements.
 
- Protected Member Functions inherited from GEOGen::small_set< GEO::signed_index_t, 3 >
void grow ()
 Increases the size of this small_set. More...
 
iterator find_i (const GEO::signed_index_t &x)
 Finds where an element is or where it should be inserted from its value. More...
 
const_iterator find_i (const GEO::signed_index_t &x) const
 Finds where an element should be located from its value. More...
 
- Protected Attributes inherited from GEOGen::small_set< GEO::signed_index_t, 3 >
GEO::signed_index_t data_ [DIM]
 
index_t size_
 

Detailed Description

A set of three integers that encodes the equation of a vertex in GenericVoronoiDiagram.

  • Each positive entry i denotes the bisector of the segment that connects the center vertex to the i-th vertex (note that the center vertex needs to be stored elsewhere, but is known when a RVD is used, since we know which dual cell we are processing).
  • Each negative entry i denotes the i-th face in the boundary TriMesh. Note: indexing starts with 1 (resp. -1), 0 is kept for error codes.
  • There is some additional information for the following two configurations:

    • boundary vertex: (nb_boundary_facets = 3) the index of the boundary vertex is returned by get_boundary_vertex()
    • intersection between boundary edge and bisector: (nb_boundary_facets = 2) the indices v1,v2 of the extremities of the boundary edges are obtained by get_boundary_edge(v1,v2)

    Doing so avoids recomputing vertices that we already know (and avoids numerical problems when the boundary surface has coplanar (or nearly coplanar) facets). It also allows using exact predicates (not implemented yet).

Note
This is an internal implementation class, not meant to be used by client code.

Definition at line 408 of file generic_RVD_vertex.h.

Member Function Documentation

◆ bisector()

index_t GEOGen::SymbolicVertex::bisector ( signed_index_t  i) const
inline

Gets a bisector.

Parameters
[in]ilocal index of the bisector
Returns
the index of the Delaunay vertex that corresponds to the second extremity of the bisector
Precondition
i < nb_bisectors()

Definition at line 481 of file generic_RVD_vertex.h.

◆ boundary_facet()

index_t GEOGen::SymbolicVertex::boundary_facet ( signed_index_t  i) const
inline

Gets a boundary facet.

Parameters
[in]ilocal index of the boundary facet
Returns
the index of the mesh facet
Precondition
i < nb_boundary_facets()

Definition at line 492 of file generic_RVD_vertex.h.

◆ get_boundary_edge()

void GEOGen::SymbolicVertex::get_boundary_edge ( index_t &  v1,
index_t &  v2 
) const
inline

Gets the global indices of the boundary vertices that define the boundary edge on which this vertex is located.

Parameters
[out]v1index of the first extremity of the boundary edge
[out]v2index of the second extremity of the boundary edge
Precondition
nb_boundary_facets() == 2

Definition at line 533 of file generic_RVD_vertex.h.

◆ get_boundary_vertex()

index_t GEOGen::SymbolicVertex::get_boundary_vertex ( ) const
inline

Gets the global index of the boundary vertex that corresponds to this vertex.

Precondition
nb_boundary_facets() == 3

Definition at line 520 of file generic_RVD_vertex.h.

◆ has_bisector()

bool GEOGen::SymbolicVertex::has_bisector ( index_t  i) const
inline

Tests whether a bisector is present in the symbolic representation this vertex.

Parameters
[in]iglobal index of the bisector

Definition at line 502 of file generic_RVD_vertex.h.

◆ has_boundary_facet()

bool GEOGen::SymbolicVertex::has_boundary_facet ( index_t  i) const
inline

Tests whether a boundary facet is present in the symbolic representation of this vertex.

Parameters
[in]iglobal index of the boundary facet

Definition at line 511 of file generic_RVD_vertex.h.

◆ intersect_symbolic()

bool GEOGen::SymbolicVertex::intersect_symbolic ( const thisclass v1,
const thisclass v2,
index_t  E 
)
inline

Computes the symbolic representation of the intersection between a segment and a bisector.

Computes the intersection between the segment [v1, v2] and the bisector E

Returns
false if there was a problem (happens sometimes in finite precision mode)

Definition at line 582 of file generic_RVD_vertex.h.

◆ set_boundary_edge()

void GEOGen::SymbolicVertex::set_boundary_edge ( index_t  v1,
index_t  v2 
)
inline

Sets the boundary edge on which this vertex is located.

Parameters
[in]v1global index of the first boundary vertex
[in]v2global index of the second boundary vertex

Definition at line 555 of file generic_RVD_vertex.h.

◆ set_boundary_vertex()

void GEOGen::SymbolicVertex::set_boundary_vertex ( index_t  v)
inline

Sets the boundary vertex on which this vertex is located.

Parameters
[in]vglobal index of the boundary vertex

Definition at line 545 of file generic_RVD_vertex.h.

◆ to_unsigned_int()

static index_t GEOGen::SymbolicVertex::to_unsigned_int ( signed_index_t  x)
inlinestatic

Casts a signed_index_t into an (unsigned) index_t.

In debug mode, throws an assertion failure exception whenever x is negative.

Definition at line 469 of file generic_RVD_vertex.h.


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