Force Directed Edge Bundling
 All Classes Functions Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Edge Class Reference

#include <graph.h>

Public Member Functions

 Edge (Node *n1, Node *n2)
 
void setNewSubdivisionPoints (QPolygonF p)
 
void updateSubdivisionPoints ()
 
QPolygonF getSubdivisionPoints ()
 
void clearSubdivisionPoints ()
 
Nodestart (void)
 
Nodeend (void)
 
QVector2D midPoint (void)
 
QVector2D vector (void)
 
double length (void)
 
void increaseSubdivisions (void)
 
void increaseSubdivisions (int numSubdivisions)
 
double compatibility (Edge *other)
 
QString toString (void)
 

Protected Member Functions

double compatibility_angular (Edge *other)
 
double compatibility_scale (Edge *other)
 
double compatibility_positional (Edge *other)
 
double compatibility_visibility (Edge *other)
 
double visibilityFactor (Edge *other)
 
QPair< QVector2D, QVector2D > bandOfSight (Edge *other)
 

Protected Attributes

Nodenode_start
 
Nodenode_end
 
QPolygonF subdivisionPoints
 
QPolygonF newSubdivisionPoints
 

Detailed Description

Datastructure for one Edge instance

Constructor & Destructor Documentation

Edge::Edge ( Node n1,
Node n2 
)
inline

Constructor for an edge, initializes the edges with a start and end node and an empty list of subdivision points

Parameters
n1pointer to start node
n2pointer to end node

Member Function Documentation

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
otherEdge to be compared with this one.
double Edge::compatibility ( Edge other)

calculate the edge's compatibility by multiplying the individual compatibility parameters.

Parameters
otherEdge 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
otherEdge 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
otherEdge 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
otherEdge 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
otherEdge 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
numSubdivisionsnumber 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
pnew 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
otherEdge to be compared with this one.

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