Delaunator
2D Delaunay Triangulation in C++ with Python wrapper.
 All Classes Namespaces Functions
Public Member Functions | Public Attributes | List of all members
Edge Class Reference

#include <edge.h>

Public Member Functions

 Edge (Vertex *=NULL, Edge *=NULL, Edge *=NULL, Face *=NULL, bool=true)
 ~Edge ()
float distanceTo (Coordinates c) const
float distanceTo (float x, float y) const
float squareDistanceTo (Coordinates c) const
float squareDistanceTo (float x, float y) const
bool coordOnTheStrictRight (Coordinates) const
bool coordOnTheRight (Coordinates) const
bool coordOnTheStrictLeft (Coordinates) const
bool coordOnTheLeft (Coordinates) const
VertexoriginVertex () const
VertexdestinVertex () const
EdgeoppositeEdge () const
EdgenextLeftEdge () const
EdgeprevLeftEdge () const
EdgenextRightEdge () const
EdgeprevRightEdge () const
EdgerotLeftEdge () const
EdgerotRightEdge () const
FaceleftFace () const
FacerightFace () const
bool isVisible () const
bool isConstraigned () const
bool isExternal () const
unsigned int getID () const
float length () const
float squareLength () const
Coordinates middle () const
void setOriginVertex (Vertex *v)
void setOppositeEdge (Edge *e)
void setNextLeftEdge (Edge *e)
void setLeftFace (Face *f, short ttl=4)
void setVisibility (bool v)
void setConstraigned (bool c)

Public Attributes

bool passing

Detailed Description

Edge is the main object of quad-edge representation.

Constructor & Destructor Documentation

Edge::Edge ( Vertex orgn = NULL,
Edge oppst = NULL,
Edge nxt_lft = NULL,
Face fc = NULL,
bool  visible = true 
)

Given references to other objects, if not NULL, will be modified as possible. (calls to accessors setEdge)

Parameters
orgnorigin Vertex of this Edge
oppstopposite Edge
nxt_leftnext left Edge
Facedelimited by this Edge
visiblenecessary for quad-edge representation, and be only set to true if user know exactly what he do
Returns
a new and well initialized Edge
Edge::~Edge ( )

Frees.

Member Function Documentation

bool Edge::coordOnTheLeft ( Coordinates  c) const
Parameters
cevaluated Coordinates
Returns
true if given coordinates are on the left of this Edge.
bool Edge::coordOnTheRight ( Coordinates  c) const
Parameters
cevaluated Coordinates
Returns
true if given coordinates are on the right of this Edge.
bool Edge::coordOnTheStrictLeft ( Coordinates  c) const
Parameters
cevaluated Coordinates
Returns
true if given coordinates are on the left of this Edge, but not on the Edge itself aligned with.
bool Edge::coordOnTheStrictRight ( Coordinates  c) const
Parameters
cevaluated Coordinates
Returns
true if given coordinates are on the right of this Edge, but not on the Edge itself aligned with.
float Edge::distanceTo ( Coordinates  c) const
inline
Parameters
ctarget Coordinates
Returns
shorter distance between this Edge and the target
float Edge::distanceTo ( float  x,
float  y 
) const
inline
Parameters
xx coordinate of target
yy coordinate of target
Returns
shorter distance between this Edge and the target
bool Edge::isExternal ( ) const

An external Edge is an Edge that rely two corner Vertex.

Returns
true iff this is one of the eight external Edge.
float Edge::length ( ) const
Returns
distance between the origin and destination Vertex
Coordinates Edge::middle ( ) const
Returns
Coordinates of the middle of this Edge.
float Edge::squareDistanceTo ( Coordinates  c) const
inline
Parameters
ctarget Coordinates
Returns
square of shorter distance between this Edge and the target
float Edge::squareDistanceTo ( float  px,
float  py 
) const
Parameters
xx coordinate of target
yy coordinate of target
Returns
square of shorter distance between this Edge and the target
Parameters
xx coordinate of target
yy coordinate of target Return square of distance between the edge and given coordinates.
float Edge::squareLength ( ) const
Returns
square distance between the origin and destination Vertex

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