Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/helpers/LongPathfinder.h
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | private: | ||||
*/ | */ | ||||
void ComputeJPSPath(const HierarchicalPathfinder& hierPath, entity_pos_t x0, entity_pos_t z0, const PathGoal& origGoal, pass_class_t passClass, WaypointPath& path) const; | void ComputeJPSPath(const HierarchicalPathfinder& hierPath, entity_pos_t x0, entity_pos_t z0, const PathGoal& origGoal, pass_class_t passClass, WaypointPath& path) const; | ||||
void GetDebugDataJPS(u32& steps, double& time, Grid<u8>& grid) const; | void GetDebugDataJPS(u32& steps, double& time, Grid<u8>& grid) const; | ||||
// Helper functions for ComputePath | // Helper functions for ComputePath | ||||
/** | /** | ||||
* Given a path with an arbitrary collection of waypoints, updates the | * Given a path with an arbitrary collection of waypoints, updates the | ||||
* waypoints to be nicer. Calls "Testline" between waypoints | * waypoints to be nicer. Calls "CheckMovement" between waypoints | ||||
* so that bended paths can become straight if there's nothing in between | * so that bended paths can become straight if there's nothing in between | ||||
* (this happens because A* is 8-direction, and the map isn't actually a grid). | * (this happens because A* is 8-direction, and the map isn't actually a grid). | ||||
* If @param maxDist is non-zero, path waypoints will be espaced by at most @param maxDist. | * If @param maxDist is non-zero, path waypoints will be espaced by at most @param maxDist. | ||||
* In that case the distance between (x0, z0) and the first waypoint will also be made less than maxDist. | * In that case the distance between (x0, z0) and the first waypoint will also be made less than maxDist. | ||||
*/ | */ | ||||
void ImprovePathWaypoints(WaypointPath& path, pass_class_t passClass, entity_pos_t maxDist, entity_pos_t x0, entity_pos_t z0) const; | void ImprovePathWaypoints(WaypointPath& path, pass_class_t passClass, entity_pos_t maxDist, entity_pos_t x0, entity_pos_t z0) const; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator