#include <graph.h>
|
Node * | node_start |
|
Node * | node_end |
|
QPolygonF | subdivisionPoints |
|
QPolygonF | newSubdivisionPoints |
|
Datastructure for one Edge instance
Constructor for an edge, initializes the edges with a start and end node and an empty list of subdivision points
- Parameters
-
n1 | pointer to start node |
n2 | pointer to end node |
QPair< QVector2D, QVector2D > Edge::bandOfSight |
( |
Edge * |
other | ) |
|
|
protected |
Calculate the two points composing the band of sight according to the algorithm proposed in the paper.
- Parameters
-
other | Edge to be compared with this one. |
double Edge::compatibility |
( |
Edge * |
other | ) |
|
calculate the edge's compatibility by multiplying the individual compatibility parameters.
- Parameters
-
other | Edge to be compared with this one. |
double Edge::compatibility_angular |
( |
Edge * |
other | ) |
|
|
protected |
calculate the angular compatibility between this edge and the one passed in the function.
paper suggests calculating the cosine and then the arcus cosine which I left out because I didn't see why?
- Parameters
-
other | Edge to be compared with this one. |
double Edge::compatibility_positional |
( |
Edge * |
other | ) |
|
|
protected |
calculate the compatibility between the spatial distance of this edge and the one passed in the function
- Parameters
-
other | Edge to be compared with this one. |
double Edge::compatibility_scale |
( |
Edge * |
other | ) |
|
|
protected |
calculate the compatibility between the scale of this edge and the one passed in the function
- Parameters
-
other | Edge to be compared with this one. |
double Edge::compatibility_visibility |
( |
Edge * |
other | ) |
|
|
protected |
calculate the compatibility between the visibility of this edge and the one passed in the function visibilities are calculated in both direction, using the minimal value of both results.
- Parameters
-
other | Edge to be compared with this one. |
QPolygonF Edge::getSubdivisionPoints |
( |
| ) |
|
|
inline |
Return the polygon containing the edge's subdivision points.
- Returns
- subdivision polygon.
void Edge::increaseSubdivisions |
( |
void |
| ) |
|
Increase the edge's subdivision points by always naively inserting additional subdivisions between existing ones: 1 -> 3 -> 7 -> ...
This approach does not adhere to the paper's suggestion of increasing the nodes in this succession: 1 -> 2 -> 4 -> 8 -> 16 -> 32
void Edge::increaseSubdivisions |
( |
int |
numSubdivisions | ) |
|
divide the edge's total length and then convert to a specific number of subdivisions inserting the new subdivision points in equidistant intervals.
This function can adhere to the succession 1 -> 2 -> 4 -> 8 -> 16 -> 32 suggested in the paper but is more complex than the overloaded increaseSubdivisions() taking no arguments.
- Parameters
-
numSubdivisions | number of subdivisions the edge should be divided into |
void Edge::setNewSubdivisionPoints |
( |
QPolygonF |
p | ) |
|
|
inline |
Store a list of subdivision points temporarily, while the bundling is in progress.
- Parameters
-
p | new polygon of subdivision points |
void Edge::updateSubdivisionPoints |
( |
| ) |
|
|
inline |
After the bundling is finished, update the list of the edge's subdivision points to the previously stored new ones. s
double Edge::visibilityFactor |
( |
Edge * |
other | ) |
|
|
protected |
Evaluate the factor of visibility from one edge to another according to the algorithm proposed in the paper.
- Parameters
-
other | Edge to be compared with this one. |
The documentation for this class was generated from the following files: