libsurf
Programmer's Documentation

Public Member Functions | Private Attributes | List of all members
DnEdge Class Reference

Detailed Description

Edge in a Delaunay triangulation.

An edge is represented by its source and target vertices. Since all edges are undirected (i.e s-t is the same as t-s), indices are ordered so that source() is always smaller than target(). Additionally, an edge can be connected to two triangles, whose indices are stored.

See Also
DnMesh

#include <dnedge.h>

Public Member Functions

 DnEdge (uint a, uint b)
 construct new edge
 
void reconnect (uint a, uint b)
 connect edge to different vertices
 
bool isValid () const
 check if edge is defined
 
void invalidate ()
 mark edge as invalid
 
uint source () const
 access source vertex index
 
uint target () const
 access target vertex index
 
uint nNeighbors () const
 count number of neighbor triangles
 
uint nbTriangle (uint i) const
 access neighbor triangle indices
 
uint opposed (uint ti) const
 access triangle which is opposed to triangle with index ti
 
uint find (uint i) const
 check if edge has vertex i
 
uint attachTriangle (uint fi)
 add triangle to neighbor list
 
uint detachTriangle (uint fi)
 remove triangle from neighbor list
 
uint replaceTriangle (uint fold, uint fnew)
 replace a connection with another
 
bool operator< (const DnEdge &a) const
 define a unique ordering for edges
 
bool operator== (const DnEdge &a) const
 define edge identity
 
Real pIntersect (const DnVertexArray &vtx, uint a, uint b) const
 compute where *this intersects (a,b) in the parameter domain
 
bool pIntersects (const DnVertexArray &vtx, uint a, uint b) const
 test if *this intersects (a,b) in the parameter domain
 
bool sIntersects (const Surface &srf, const DnVertexArray &vtx, uint a, uint b) const
 test if *this overlaps (a,b) in 3D space with small distance
 
Real pLength (const DnVertexArray &vtx) const
 edge length in parameter space
 
Real sLength (const DnVertexArray &vtx) const
 edge length in 3D space
 

Private Attributes

uint vi [2]
 source and target edge
 
uint nbf [2]
 exactly two neighbor faces
 

The documentation for this class was generated from the following file:
Generated on Wed Jan 19 2022 03:03:16 for libsurf by   doxygen 1.8.5