Edge2 is a directed edge.
More...
#include <Edge2.h>
|
std::ostream & | operator<< (std::ostream &stream, const Edge2 &e) |
|
Edge2 is a directed edge.
◆ Edge2()
GEOM_FADE2D::Edge2::Edge2 |
( |
Triangle2 * |
pT, |
|
|
int |
oppIdx_ |
|
) |
| |
Constructor.
- Parameters
-
pT | is the triangle from which the edge is constructed |
oppIdx_ | is intra-triangle-index of the opposite vertex (of the edge) in pT |
The orientation of the constructed Edge2 is counterclockwise (CCW) with respect to pT
. Example: Edge2(pT,0) creates an edge from pT->getCorner(1) to pT->getCorner(2).
◆ getIndex()
int GEOM_FADE2D::Edge2::getIndex |
( |
| ) |
const |
Get the opposite index
- Returns
- the intra-triangle-index of the opposite vertex
◆ getLength2D()
double GEOM_FADE2D::Edge2::getLength2D |
( |
| ) |
const |
Get the length
- Returns
- the length of the edge
◆ getPoints()
void GEOM_FADE2D::Edge2::getPoints |
( |
Point2 *& |
p1, |
|
|
Point2 *& |
p2 |
|
) |
| const |
Get the endpoints.
returns the source point of the edge as p1
and the target point as p2
◆ getSrc()
Point2* GEOM_FADE2D::Edge2::getSrc |
( |
| ) |
const |
Get the source point.
- Returns
- the source point of the edge, i.e. pT->getCorner((oppIdx+1)%3)
◆ getTrg()
Point2* GEOM_FADE2D::Edge2::getTrg |
( |
| ) |
const |
Get the target point.
- Returns
- the target point of the edge, i.e. pT->getCorner((oppIdx+2)%3)
◆ getTriangle()
Triangle2* GEOM_FADE2D::Edge2::getTriangle |
( |
| ) |
const |
Get the triangle
- Returns
- the triangle whose directed edge the present edge is
◆ getTriangles()
void GEOM_FADE2D::Edge2::getTriangles |
( |
Triangle2 *& |
pT0, |
|
|
Triangle2 *& |
pT1, |
|
|
int & |
idx0, |
|
|
int & |
idx1 |
|
) |
| const |
Get the triangles
- Returns
- the two adjacent triangles of the present edge along with their intra-triangle-indices
- Parameters
-
pT0 | is used to return the triangle whose directed edge the present edge is |
idx0 | is the opposite intra-triangle-index in pT0 of the present edge |
pT1 | is the other adjacent triangle at the present edge (or NULL) |
idx1 | is the intra-triangle index of the present edge in pT1 (or -1) |
◆ operator!=()
bool GEOM_FADE2D::Edge2::operator!= |
( |
const Edge2 & |
e | ) |
const |
|
inline |
operator!=()
operator!=() returns true if the compared edges are different. Be aware that edges are directed and therefore two adjacent triangles do not share the same Edge2.
◆ operator<()
bool GEOM_FADE2D::Edge2::operator< |
( |
const Edge2 & |
e | ) |
const |
|
inline |
operator<()
operator<() does NOT compare edge lengths but the associated triangle pointers and intra-triangle indices. This is useful when edges are used in STL containers.
◆ operator==()
bool GEOM_FADE2D::Edge2::operator== |
( |
const Edge2 & |
e | ) |
const |
|
inline |
operator==()
operator==() compares oriented edges, i.e., it returns only true when the two edges have been made from the same triangle and the same intra-triangle-index i.e., an edge with two adjacent triangles has two Edge2 objects, one in each direction.
The documentation for this class was generated from the following file: