Represents a directed edge in a triangulation. More...
#include <Edge2.h>
Public Member Functions | |
| Edge2 () | |
| Default constructor. | |
| Edge2 (const Edge2 &e) | |
| Copy constructor. More... | |
| Edge2 (Triangle2 *pT, int oppIdx_) | |
| Constructs an Edge2 from a Triangle2 and an intra-triangle-index. More... | |
| ~Edge2 () | |
| Destructor. | |
| int | getIndex () const |
| Get the intra-triangle-index of the edge. More... | |
| double | getLength25D () const |
| Get the 2.5D length of the edge. More... | |
| double | getLength2D () const |
| Get the 2D length of the edge. More... | |
| void | getPoints (Point2 *&p1, Point2 *&p2) const |
| Get both endpoints of the edge. More... | |
| Point2 * | getSrc () const |
| Get the source point of the edge. More... | |
| Point2 * | getTrg () const |
| Get the target point of the edge. More... | |
| Triangle2 * | getTriangle () const |
| Get the Triangle2 associated with the edge. More... | |
| void | getTriangles (Triangle2 *&pT0, Triangle2 *&pT1, int &idx0, int &idx1) const |
| Get the two adjacent triangles of the edge. More... | |
| bool | operator!= (const Edge2 &e) const |
| Inequality operator for edges. More... | |
| bool | operator< (const Edge2 &e) const |
| Comparison operator for ordering edges (does not compare the lengths) More... | |
| Edge2 & | operator= (const Edge2 &other) |
| Assignment operator. More... | |
| bool | operator== (const Edge2 &e) const |
| Equality operator for edges. More... | |
Protected Attributes | |
| int | oppIdx |
| Triangle2 * | pT |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const Edge2 &e) |
Stream output for Edge2. More... | |
An Edge2 defines a directed edge, represented by a
Triangle2 object andpT.The orientation of the Edge2 is always counterclockwise (CCW) with respect to the Triangle2.
| GEOM_FADE25D::Edge2::Edge2 | ( | const Edge2 & | e | ) |
| e | The edge to copy. |
| GEOM_FADE25D::Edge2::Edge2 | ( | Triangle2 * | pT, |
| int | oppIdx_ | ||
| ) |
| pT | The Triangle2 from which the edge is constructed. |
| oppIdx_ | The index of the opposite vertex in the triangle. |
The edge is oriented counterclockwise (CCW) with respect to pT. For example, Edge2(pT, 0) constructs an edge from pT->getCorner(1) to pT->getCorner(2).
| int GEOM_FADE25D::Edge2::getIndex | ( | ) | const |
| double GEOM_FADE25D::Edge2::getLength25D | ( | ) | const |
| double GEOM_FADE25D::Edge2::getLength2D | ( | ) | const |
| p1 | The source point of the edge. |
| p2 | The target point of the edge. |
| Point2* GEOM_FADE25D::Edge2::getSrc | ( | ) | const |
pT->getCorner((oppIdx + 1) % 3). | Point2* GEOM_FADE25D::Edge2::getTrg | ( | ) | const |
pT->getCorner((oppIdx + 2) % 3). | Triangle2* GEOM_FADE25D::Edge2::getTriangle | ( | ) | const |
| void GEOM_FADE25D::Edge2::getTriangles | ( | Triangle2 *& | pT0, |
| Triangle2 *& | pT1, | ||
| int & | idx0, | ||
| int & | idx1 | ||
| ) | const |
| pT0 | The first adjacent triangle. |
| idx0 | The intra-triangle index in the first adjacent triangle. |
| pT1 | The second adjacent triangle (or NULL if not present). |
| idx1 | The intra-triangle index in the second adjacent triangle (or -1 if not present). |
|
inline |
|
inline |
Assignment operator.
| other | The edge to assign from. |
|
inline |
The edges are considered equal if they have the same Triangle2 and intra-triangle index, i.e., they are compared as directed edges.
| e | The edge to compare to. |
true if the edges are equal.
|
friend |
| stream | The output stream to write to. |
| e | The edge to output. |