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

#include <tess/path/path.h>

Public Member Functions

void reserve_waypoints (std::size_t count)
void reserve_path_nodes (std::size_t node_count)
void reserve_dependencies (std::size_t count)
void clear () noexcept
template<typename World>
auto is_valid (const World &world) const noexcept -> bool
auto request () const noexcept -> PathRequest
auto waypoints () const noexcept -> std::span< const Coord3 >
auto dependencies () const noexcept -> std::span< const ChunkVersionDependencies::ChunkVersionDependency >
auto route_candidates () const noexcept -> std::size_t
auto portal_scan_tiles () const noexcept -> std::size_t

Friends

template<typename World, typename PassableTag, typename CostTag>
auto build_weighted_portal_route_product (const World &world, PathRequest request, std::span< const Coord3 > waypoints, PathScratch &scratch, WeightedPortalRouteProduct &product) -> PathResult
template<typename World, typename PassableTag, typename CostTag>
auto build_weighted_portal_route_product (const World &world, PathRequest request, std::span< const Coord3 > waypoints, PathScratch &scratch, WeightedPortalSegmentCache &cache, WeightedPortalRouteProduct &product) -> PathResult
 Builds a weighted portal route while reusing class-bound cached segments.
template<typename World, typename PassableTag, typename CostTag>
auto build_weighted_chunk_portal_route_product (const World &world, PathRequest request, PathScratch &scratch, WeightedPortalRouteProduct &product) -> PathResult
template<typename World>
auto weighted_portal_route_product_path (const World &world, const WeightedPortalRouteProduct &product) -> PathResult
 Replays a portal-route product when its dependencies remain current.

Detailed Description

Owns a segmented weighted route, waypoints, and replay dependencies.

Returned path and waypoint views borrow this product until its next mutation. Reserve capacity to keep repeated builds allocation-free.

◆ build_weighted_chunk_portal_route_product

template<typename World, typename PassableTag, typename CostTag>
auto build_weighted_chunk_portal_route_product ( const World & world,
PathRequest request,
PathScratch & scratch,
WeightedPortalRouteProduct & product ) -> PathResult
friend

Builds a weighted route from chunk-portal candidates and A* segments.

The returned path borrows product; subsequent product mutation invalidates it. Building reuses caller-owned scratch and product capacities.

◆ build_weighted_portal_route_product

template<typename World, typename PassableTag, typename CostTag>
auto build_weighted_portal_route_product ( const World & world,
PathRequest request,
std::span< const Coord3 > waypoints,
PathScratch & scratch,
WeightedPortalRouteProduct & product ) -> PathResult
friend

Builds a dense weighted route by joining caller-provided portal waypoints.

The returned path borrows product; the function tolerates waypoint spans that already refer to the product's own storage.


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