6#include "treepathvertice.h"
21 _origin(nullptr), _destination(nullptr) {}
64 bool isValid()
const {
return _lines.count() > 0; }
67 void initializeFromLines();
68 void initializeVertices();
77 void debugLog(
const char* file,
int line,
int level,
const QString& text);
A list of Line objects with spatial query helpers.
Represents a 2D line segment between two Point endpoints.
A Dijkstra-based spanning tree for finding shortest paths through a line network.
virtual ~SpanningTree()
Destructor — frees all dynamically allocated vertex objects.
TreePathVertice::List vertices() const
Return all vertices in the spanning tree.
void setOrigin(const QPointF &origin, Geo::Direction preferredDirection=Geo::NoDirection)
Set the origin point from which to route.
bool isValid() const
Return true if the spanning tree contains at least one line segment.
SpanningTree()
Default constructor — creates an empty, invalid spanning tree.
void setDestination(const QPointF &destination)
Set the destination point to route towards.
Line::List computePath()
Compute the shortest path from origin to destination through the line network.
SpanningTree(const Line::List &lines)
Construct a SpanningTree from a network of line segments.
A list of TreePathVertice pointers.
A map from hash-name string to TreePathVertice pointer.
Represents a single vertex in the spanning-tree graph used by PathRouter.
VerticeType
Classifies a vertice's role in the path graph.
Direction
Cardinal directions, aliased to the corresponding Side values.
@ NoDirection
No direction.