GEOS  3.14.0dev
Public Member Functions | List of all members
geos::operation::linemerge::LineMergeDirectedEdge Class Reference

A DirectedEdge of a LineMergeGraph. More...

#include <LineMergeDirectedEdge.h>

Inheritance diagram for geos::operation::linemerge::LineMergeDirectedEdge:
geos::planargraph::DirectedEdge geos::planargraph::GraphComponent

Public Member Functions

 LineMergeDirectedEdge (planargraph::Node *from, planargraph::Node *to, const geom::Coordinate &directionPt, bool edgeDirection)
 Constructs a LineMergeDirectedEdge connecting the from node to the to node. More...
 
LineMergeDirectedEdgegetNext (bool checkDirection=false)
 Returns the directed edge that starts at this directed edge's end point, or null if there are zero or multiple directed edges starting there. More...
 
- Public Member Functions inherited from geos::planargraph::DirectedEdge
 DirectedEdge (Node *newFrom, Node *newTo, const geom::Coordinate &directionPt, bool newEdgeDirection)
 Constructs a DirectedEdge connecting the from node to the to node. More...
 
EdgegetEdge () const
 Returns this DirectedEdge's parent Edge, or null if it has none.
 
void setEdge (Edge *newParentEdge)
 Associates this DirectedEdge with an Edge (possibly null, indicating no associated Edge).
 
int getQuadrant () const
 Returns 0, 1, 2, or 3, indicating the quadrant in which this DirectedEdge's orientation lies.
 
const geom::CoordinategetDirectionPt () const
 Returns a point to which an imaginary line is drawn from the from-node to specify this DirectedEdge's orientation.
 
bool getEdgeDirection () const
 Returns whether the direction of the parent Edge (if any) is the same as that of this Directed Edge.
 
NodegetFromNode () const
 Returns the node from which this DirectedEdge leaves.
 
NodegetToNode () const
 Returns the node to which this DirectedEdge goes.
 
geom::CoordinategetCoordinate () const
 Returns the coordinate of the from-node.
 
double getAngle () const
 Returns the angle that the start of this DirectedEdge makes with the positive x-axis, in radians.
 
DirectedEdgegetSym () const
 Returns the symmetric DirectedEdge – the other DirectedEdge associated with this DirectedEdge's parent Edge.
 
void setSym (DirectedEdge *newSym)
 Sets this DirectedEdge's symmetric DirectedEdge, which runs in the opposite direction.
 
int compareTo (const DirectedEdge *obj) const
 Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b", 0 if the DirectedEdges are collinear, and -1 otherwise. More...
 
int compareDirection (const DirectedEdge *e) const
 Returns 1 if this DirectedEdge has a greater angle with the positive x-axis than b", 0 if the DirectedEdges are collinear, and -1 otherwise. More...
 
std::string print () const
 Prints a detailed string representation of this DirectedEdge to the given PrintStream.
 
- Public Member Functions inherited from geos::planargraph::GraphComponent
virtual bool isVisited () const
 Tests if a component has been visited during the course of a graph algorithm. More...
 
virtual void setVisited (bool p_isVisited)
 Sets the visited flag for this component. More...
 
virtual bool isMarked () const
 Tests if a component has been marked at some point during the processing involving this graph. More...
 
virtual void setMarked (bool p_isMarked)
 Sets the marked flag for this component. More...
 

Additional Inherited Members

- Public Types inherited from geos::planargraph::DirectedEdge
typedef std::list< DirectedEdge * > NonConstList
 
typedef std::list< const DirectedEdge * > ConstList
 
typedef std::vector< DirectedEdge * > NonConstVect
 
typedef std::vector< const DirectedEdge * > ConstVect
 
typedef std::vector< DirectedEdge * > Vect
 
- Static Public Member Functions inherited from geos::planargraph::DirectedEdge
static std::vector< Edge * > * toEdges (std::vector< DirectedEdge * > &dirEdges)
 Returns a List containing the parent Edge (possibly null) for each of the given DirectedEdges. More...
 
static void toEdges (std::vector< DirectedEdge * > &dirEdges, std::vector< Edge * > &parentEdges)
 Add parent Edge (possibly null) of each of the given DirectedEdges to the given parentEdges vector. More...
 
- Static Public Member Functions inherited from geos::planargraph::GraphComponent
template<typename T >
static void setVisited (T start, T end, bool visited)
 Sets the Visited state for the elements of a container, from start to end iterator. More...
 
template<typename T >
static void setVisitedMap (T start, T end, bool visited)
 Sets the Visited state for the values of each map container element, from start to end iterator. More...
 
template<typename T >
static void setMarked (T start, T end, bool marked)
 Sets the Marked state for the elements of a container, from start to end iterator. More...
 
template<typename T >
static void setMarkedMap (T start, T end, bool marked)
 Sets the Marked state for the values of each map container element, from start to end iterator. More...
 
- Protected Attributes inherited from geos::planargraph::DirectedEdge
EdgeparentEdge
 
Nodefrom
 
Nodeto
 
geom::Coordinate p0
 
geom::Coordinate p1
 
DirectedEdgesym
 
bool edgeDirection
 
int quadrant
 
double angle
 
- Protected Attributes inherited from geos::planargraph::GraphComponent
bool isMarkedVar
 Variable holding ''marked'' status.
 
bool isVisitedVar
 Variable holding ''visited'' status.
 

Detailed Description

A DirectedEdge of a LineMergeGraph.

Constructor & Destructor Documentation

◆ LineMergeDirectedEdge()

geos::operation::linemerge::LineMergeDirectedEdge::LineMergeDirectedEdge ( planargraph::Node from,
planargraph::Node to,
const geom::Coordinate directionPt,
bool  edgeDirection 
)

Constructs a LineMergeDirectedEdge connecting the from node to the to node.

Parameters
fromfrom node
toto node
directionPtspecifies this DirectedEdge's direction (given by an imaginary line from the from node to directionPt)
edgeDirectionwhether this DirectedEdge's direction is the same as or opposite to that of the parent Edge (if any)

Member Function Documentation

◆ getNext()

LineMergeDirectedEdge* geos::operation::linemerge::LineMergeDirectedEdge::getNext ( bool  checkDirection = false)

Returns the directed edge that starts at this directed edge's end point, or null if there are zero or multiple directed edges starting there.

Parameters
checkDirectiononly consider directed edges with same direction as parent edge
Returns
the directed edge
null if there are zero or multiple directed edges starting there

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