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

Internal representation of vertices in GenericVoronoiDiagram. More...

#include <geogram/voronoi/generic_RVD_vertex.h>

Public Member Functions

 Vertex (const double *p, double w, signed_index_t f, const SymbolicVertex &sym)
 Creates a new Vertex. More...
 
 Vertex (const double *p, double w, signed_index_t f)
 Creates a new Vertex. More...
 
 Vertex ()
 Creates an uninitialized Vertex.
 
const double * point () const
 Gets the geometric location at this Vertex. More...
 
void set_point (const double *p)
 Sets the geometric location at this vertex. More...
 
double weight () const
 Gets Vertex weight. More...
 
void set_weight (double w)
 Sets the vertex weight. More...
 
signed_index_t adjacent_seed () const
 Gets the adjacent seed. More...
 
void set_adjacent_seed (signed_index_t s)
 Sets the adjacent seed. More...
 
const SymbolicVertexsym () const
 Gets the symbolic representation. More...
 
SymbolicVertexsym ()
 Gets the symbolic representation.
 
signed_index_t adjacent_facet () const
 Gets the adjacent facet. More...
 
void set_adjacent_facet (signed_index_t f)
 Sets the adjacent facet. More...
 
 operator const double * () const
 Implicit conversion that accesses the geometric location. More...
 
void clear ()
 Clears this Vertex.
 
void set_flag (EdgeFlag f)
 Sets an EdgeFlag in this Vertex.
 
void unset_flag (EdgeFlag f)
 Resets an EdgeFlag in this Vertex.
 
bool check_flag (EdgeFlag f) const
 Tests an EdgeFlag in this Vertex.
 
void copy_edge_from (const Vertex &rhs)
 Copies adjacent facet and edge flags from another Vertex.
 
template<index_t DIM>
void intersect_geom (PointAllocator &target_intersections, const Vertex &vq1, const Vertex &vq2, const double *p1, const double *p2)
 Computes the intersection between a segment and a bisector. More...
 
template<index_t DIM>
Sign side_fast (const double *p1, const double *p2) const
 Computes the side of this vertex relative to a bisector. More...
 

Detailed Description

Internal representation of vertices in GenericVoronoiDiagram.

Vertex has both geometrical and symbolic representations.

Note
This is an internal implementation class, not meant to be used by client code (except in some particular case, such as subclassing GEO::IntegrationSimplex).

Definition at line 787 of file generic_RVD_vertex.h.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

GEOGen::Vertex::Vertex ( const double *  p,
double  w,
signed_index_t  f,
const SymbolicVertex sym 
)
inline

Creates a new Vertex.

Parameters
[in]pgeometric location at the vertex, shared with caller
[in]wweight
[in]ffacet of the input mesh this Vertex comes from
[in]symsymbolic representation

Definition at line 800 of file generic_RVD_vertex.h.

◆ Vertex() [2/2]

GEOGen::Vertex::Vertex ( const double *  p,
double  w,
signed_index_t  f 
)
inline

Creates a new Vertex.

Parameters
[in]pgeometric location at the vertex, shared with caller
[in]wweight
[in]ffacet of the input mesh this Vertex comes from

Definition at line 818 of file generic_RVD_vertex.h.

Member Function Documentation

◆ adjacent_facet()

signed_index_t GEOGen::Vertex::adjacent_facet ( ) const
inline

Gets the adjacent facet.

Returns
the global index of the adjacent facet

Definition at line 907 of file generic_RVD_vertex.h.

◆ adjacent_seed()

signed_index_t GEOGen::Vertex::adjacent_seed ( ) const
inline

Gets the adjacent seed.

Returns
the global index of the adjacent seed

Definition at line 875 of file generic_RVD_vertex.h.

◆ intersect_geom()

template<index_t DIM>
void GEOGen::Vertex::intersect_geom ( PointAllocator target_intersections,
const Vertex vq1,
const Vertex vq2,
const double *  p1,
const double *  p2 
)
inline

Computes the intersection between a segment and a bisector.

Computes the intersection between the segment [vq1, vq2] and the bisector of [p1,p2]..

Template Parameters
DIMdimension, specified as a template argument for efficiency considerations

Definition at line 977 of file generic_RVD_vertex.h.

◆ operator const double *()

GEOGen::Vertex::operator const double * ( ) const
inline

Implicit conversion that accesses the geometric location.

With this implicit conversions, we can have template arguments for RestrictedVoronoiDiagram that take const double* as arguments instead of Vertices.

Returns
a const pointer to the coordinates

Definition at line 926 of file generic_RVD_vertex.h.

◆ point()

const double* GEOGen::Vertex::point ( ) const
inline

Gets the geometric location at this Vertex.

Returns
a const pointer to the coordinates

Definition at line 841 of file generic_RVD_vertex.h.

◆ set_adjacent_facet()

void GEOGen::Vertex::set_adjacent_facet ( signed_index_t  f)
inline

Sets the adjacent facet.

Parameters
[in]fthe global index of the adjacent facet

Definition at line 915 of file generic_RVD_vertex.h.

◆ set_adjacent_seed()

void GEOGen::Vertex::set_adjacent_seed ( signed_index_t  s)
inline

Sets the adjacent seed.

Parameters
[in]sthe global index of the adjacent seed

Definition at line 883 of file generic_RVD_vertex.h.

◆ set_point()

void GEOGen::Vertex::set_point ( const double *  p)
inline

Sets the geometric location at this vertex.

Parameters
[in]pthe geometric location, shared with caller

Definition at line 849 of file generic_RVD_vertex.h.

◆ set_weight()

void GEOGen::Vertex::set_weight ( double  w)
inline

Sets the vertex weight.

Used by non-uniform centroidal Voronoi tesselation..

Definition at line 867 of file generic_RVD_vertex.h.

◆ side_fast()

template<index_t DIM>
Sign GEOGen::Vertex::side_fast ( const double *  p1,
const double *  p2 
) const
inline

Computes the side of this vertex relative to a bisector.

This version is not exact.

Parameters
[in]p1first extremity of the bisector
[in]p2second extremity of the bisector
Returns
POSITIVE if this vertex is on p1's side, NEGATIVE if this vertex is on p2's side, and ZERO if this vertex is on the bisector of [p1,p2].

Definition at line 1021 of file generic_RVD_vertex.h.

◆ sym()

const SymbolicVertex& GEOGen::Vertex::sym ( ) const
inline

Gets the symbolic representation.

Symbolic representation

Definition at line 892 of file generic_RVD_vertex.h.

◆ weight()

double GEOGen::Vertex::weight ( ) const
inline

Gets Vertex weight.

Used by non-uniform centroidal Voronoi tesselation.

Definition at line 858 of file generic_RVD_vertex.h.


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