tess 0.4.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::PathScratch Class Reference

#include <tess/path/path.h>

Classes

struct  OpenNode

Public Member Functions

void reserve_nodes (std::size_t node_count)
void clear () noexcept
auto capacity_nodes () const noexcept -> std::size_t

Friends

template<typename World, typename Tag>
auto astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy=MissingChunkPolicy::TreatAsBlocked) -> PathResult
template<typename World, typename Class>
auto weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy=MissingChunkPolicy::TreatAsBlocked) -> PathResult
 Finds a weighted path using separate legacy passability and cost tags.
template<typename World, typename PassableTag, typename CostTag>
auto weighted_astar_path (const World &world, PathRequest request, PathScratch &scratch, MissingChunkPolicy policy=MissingChunkPolicy::TreatAsBlocked) -> PathResult
 Finds a weighted path using separate legacy passability and cost tags.
template<typename World, typename Tag>
auto cached_astar_path (const World &world, PathRequest request, PathScratch &scratch, RouteCacheScratch &cache) -> PathResult
 Runs unit A* with exact and same-goal suffix reuse from caller-owned cache.

Detailed Description

Owns reusable A* frontier, node state, and returned path storage.

Instances are caller-owned and require external synchronization. Reserving for the search space avoids allocation once warm.

◆ astar_path

template<typename World, typename Tag>
auto astar_path ( const World & world,
PathRequest request,
PathScratch & scratch,
MissingChunkPolicy policy = MissingChunkPolicy::TreatAsBlocked ) -> PathResult
friend

Finds a minimum-step path using a truthy passability field.

The returned path borrows scratch until its next mutation. Invalid endpoints and exhausted searches are distinguished in PathStatus.

◆ weighted_astar_path [1/2]

template<typename World, typename PassableTag, typename CostTag>
auto weighted_astar_path ( const World & world,
PathRequest request,
PathScratch & scratch,
MissingChunkPolicy policy = MissingChunkPolicy::TreatAsBlocked ) -> PathResult
friend

Finds a weighted path using separate legacy passability and cost tags.

Finds a minimum-cost path for a compile-time movement class.

The returned path borrows scratch until its next mutation.

◆ weighted_astar_path [2/2]

template<typename World, typename Class>
auto weighted_astar_path ( const World & world,
PathRequest request,
PathScratch & scratch,
MissingChunkPolicy policy = MissingChunkPolicy::TreatAsBlocked ) -> PathResult
friend

Finds a weighted path using separate legacy passability and cost tags.

Finds a minimum-cost path for a compile-time movement class.

The returned path borrows scratch until its next mutation.


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