25 #ifndef WANGLEHELPER_H
26 #define WANGLEHELPER_H
28 #include <unordered_map>
32 #include "WFiberHandler.h"
51 return ( ( std::hash< double >{}( pos.x() )
52 ^ ( std::hash< double >{}( pos.y() ) << 1 ) ) >> 1 )
53 ^ ( std::hash< double >{}( pos.z() ) << 1 );
60 typedef std::unordered_map< WPosition, WPosition, HashFn >
PositionMap;
75 typedef std::pair< WAngleHelper::PositionLineMap, WAngleHelper::PositionLineMap >
DJLinePair;
80 typedef std::pair< PositionMap, PositionDoubleMap >
DJOut;
std::vector< osg::Vec3 > PCFiber
Vector of 3D vectors, representing points.
This only is a 3d double vector.
Contains functions to help determine the path with the smallest angle change.
std::unordered_map< WPosition, double, HashFn > PositionDoubleMap
An unordered map from WPosition to double.
std::vector< WPosition > findSmoothestPath(std::vector< WPosition > positions)
Determines the path with the smallest angle change.
std::unordered_map< WPosition, PositionMap, HashFn > PositionLineMap
An unordered map from WPosition to a PositionDoubleMap.
std::pair< WAngleHelper::PositionLineMap, WAngleHelper::PositionLineMap > DJLinePair
The output of the createLine function.
std::pair< PositionMap, PositionDoubleMap > DJOut
The output of the dijkstra algorithm.
double calculateAngle(WPosition a, WPosition b)
Calculates the angle between two positions.
std::unordered_map< WPosition, WPosition, HashFn > PositionMap
An unordered map from WPosition to WPosition.
Hash function for the unorder map.
size_t operator()(const WPosition &pos) const
Hashes a WPosition object.