esp::nav::MultiGoalShortestPath struct

Struct for multi-goal shortest path finding. Used in conjunction with PathFinder::findPath.

Constructors, destructors, conversion operators

MultiGoalShortestPath()

Public functions

void setRequestedEnds(const std::vector<vec3f>& newEnds)
Set the list of desired potential end points.
auto getRequestedEnds() const -> const std::vector<vec3f>&

Public variables

vec3f requestedStart
The starting point for the path.
std::vector<vec3f> points
A list of points that specify the shortest path on the navigation mesh between requestedStart and the closest (by geodesic distance) point in requestedEnds.
float geodesicDistance
The geodesic distance.
int closestEndPointIndex
The index of the closest end point corresponding to end of the shortest path.

Variable documentation

std::vector<vec3f> esp::nav::MultiGoalShortestPath::points

A list of points that specify the shortest path on the navigation mesh between requestedStart and the closest (by geodesic distance) point in requestedEnds.

Will be empty if no path exists

float esp::nav::MultiGoalShortestPath::geodesicDistance

The geodesic distance.

Will be inf if no path exists

int esp::nav::MultiGoalShortestPath::closestEndPointIndex

The index of the closest end point corresponding to end of the shortest path.

Will be -1 if no path exists.