OpenWalnut
1.5.0dev
|
Contains functions to help determine the path with the smallest angle change. More...
Classes | |
struct | HashFn |
Hash function for the unorder map. More... | |
Typedefs | |
typedef std::unordered_map< WPosition, WPosition, HashFn > | PositionMap |
An unordered map from WPosition to WPosition. More... | |
typedef std::unordered_map< WPosition, double, HashFn > | PositionDoubleMap |
An unordered map from WPosition to double. More... | |
typedef std::unordered_map< WPosition, PositionMap, HashFn > | PositionLineMap |
An unordered map from WPosition to a PositionDoubleMap. More... | |
typedef std::pair< WAngleHelper::PositionLineMap, WAngleHelper::PositionLineMap > | DJLinePair |
The output of the createLine function. More... | |
typedef std::pair< PositionMap, PositionDoubleMap > | DJOut |
The output of the dijkstra algorithm. More... | |
Functions | |
std::vector< WPosition > | findSmoothestPath (std::vector< WPosition > positions) |
Determines the path with the smallest angle change. More... | |
std::vector< WPosition > | findSmoothestPath (std::vector< WPosition > positions, WFiberHandler::PCFiber fiber) |
Determines the path with the smallest angle change based on the given fiber. More... | |
double | calculateAngle (WPosition a, WPosition b) |
Calculates the angle between two positions. More... | |
Contains functions to help determine the path with the smallest angle change.
typedef std::pair< WAngleHelper::PositionLineMap, WAngleHelper::PositionLineMap > WAngleHelper::DJLinePair |
The output of the createLine function.
Definition at line 75 of file WAngleHelper.h.
typedef std::pair< PositionMap, PositionDoubleMap > WAngleHelper::DJOut |
The output of the dijkstra algorithm.
Definition at line 80 of file WAngleHelper.h.
typedef std::unordered_map< WPosition, double, HashFn > WAngleHelper::PositionDoubleMap |
An unordered map from WPosition to double.
Definition at line 65 of file WAngleHelper.h.
typedef std::unordered_map< WPosition, PositionMap, HashFn > WAngleHelper::PositionLineMap |
An unordered map from WPosition to a PositionDoubleMap.
Definition at line 70 of file WAngleHelper.h.
typedef std::unordered_map< WPosition, WPosition, HashFn > WAngleHelper::PositionMap |
An unordered map from WPosition to WPosition.
Definition at line 60 of file WAngleHelper.h.
Calculates the angle between two positions.
a | The first position. |
b | The second position. |
Definition at line 75 of file WAngleHelper.cpp.
Referenced by WMPointConnector::isAdaptivelyHidden().
Determines the path with the smallest angle change.
positions | The positions to build the path upon |
Definition at line 193 of file WAngleHelper.cpp.
References SaptData::distance, SaptData::endPoint, and SaptData::prevs.
Referenced by WMPointConnector::createPrediction(), findSmoothestPath(), and WMPointConnector::handleLeftSelection().
std::vector< WPosition > WAngleHelper::findSmoothestPath | ( | std::vector< WPosition > | positions, |
WFiberHandler::PCFiber | fiber | ||
) |
Determines the path with the smallest angle change based on the given fiber.
positions | The positions to build the path upon |
fiber | The fiber used to adjust the path |
Definition at line 269 of file WAngleHelper.cpp.
References findSmoothestPath().