![]() |
libgenua
Basic Geometry, Numerical Algorithms and Interfaces
|
Triangle edge.
An Edge connects two vertices and is part of its parent Triangulation. Every Edge object knows which Triangulation instance it belongs to (the latter can be retrieved using Edge::surface()).
This is a fairly light class, which basically only provides access to the vertex indices via Edge::source() and Edge::target(). Object size should be 12 bytes.
Because sorted edge lists are used by some algorithms, Edge provides comparison and equality operators, which compare by source (first) and target (second) index value.
#include <edgeface.h>
Public Member Functions | |
Edge () | |
default (empty) construction | |
Edge (const Triangulation *parent, uint from, uint to) | |
defined construction | |
virtual | ~Edge () |
virtual destruction | |
bool | operator== (const Edge &e) const |
equality | |
bool | operator!= (const Edge &e) const |
inequality | |
bool | operator< (const Edge &e) const |
comparison | |
uint | source () const |
access | |
uint | target () const |
access | |
uint | opposed (uint i) const |
return the opposed vertex index | |
bool | touches (const Edge &a) const |
connected to a? | |
bool | hasVertices (uint a, uint b) const |
defined with these two vertices? | |
Vct3 | direction () const |
compute direction vector | |
Real | length () const |
compute edge length | |
uint | degree () const |
the number of faces connected at this edge | |
FacePair | neighbors () const |
find left and right neighbor face, cast exception if edge has either one or more than two neighbor faces | |
Real | maxStretch () const |
compute maximum stretch ratio (max height of neighbor faces / edge length) | |
bool | intersects (const BndBox &bb) const |
test if edge intersects bounding box | |
const Triangulation * | surface () const |
access | |
Private Attributes | |
const Triangulation * | srf |
parent object | |
uint | src |
vertex indices | |