Basic Geometry, Numerical Algorithms and Interfaces
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Private Attributes | List of all members
Edge Class Reference

Detailed Description

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>

Collaboration diagram for Edge:

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
bool operator!= (const Edge &e) const
bool operator< (const Edge &e) const
uint source () const
uint target () const
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 Triangulationsurface () const

Private Attributes

const Triangulationsrf
 parent object
uint src
 vertex indices

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