tess 1.0.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::RegionGraphT< Residency > Class Template Reference

Region graph storage specialized by dense or sparse residency policy. More...

#include <tess/topology/topology.h>

Public Member Functions

void clear () noexcept
auto local_topologies () const noexcept -> std::span< const LocalChunkTopology >
auto portals () const noexcept -> std::span< const RegionPortal >
auto revision () const noexcept -> std::uint64_t
 Monotonic identity for the graph's current derived contents.
auto local_topology (ChunkKey chunk) const noexcept -> const LocalChunkTopology *
template<typename Shape>
auto region_of (Coord3 coord) const noexcept -> RegionRef
auto region_count () const noexcept -> std::uint32_t
auto region_index (RegionRef ref) const noexcept -> std::uint32_t
template<typename ClassOrTag>
auto matches_class () const noexcept -> bool
template<typename Provider>
auto matches_provider () const noexcept -> bool
template<typename Provider>
auto matches_provider (const Provider &provider) const noexcept -> bool

Friends

template<typename World, typename ClassOrTag, typename Provider>
auto build_region_graph (const World &world, LocalTopologyScratch &scratch, RegionGraphT< typename World::residency_type > &graph, const Provider &provider={}) -> RegionGraphBuildResult
template<typename World, typename ClassOrTag, typename Provider>
auto update_region_graph (const World &world, LocalTopologyScratch &scratch, RegionGraphT< typename World::residency_type > &graph, std::span< const ChunkKey > dirty_chunks, const Provider &provider={}) -> TopologyBuildResult
 Incrementally updates dirty chunks, rebuilding fully when stamps differ.
template<typename Shape, typename OtherResidency>
auto reachable (const RegionGraphT< OtherResidency > &graph, PathRequest request, RegionGraphScratch &scratch) -> ReachabilityResult
template<typename Shape, typename OtherResidency>
auto coarse_path (const RegionGraphT< OtherResidency > &graph, PathRequest request, RegionGraphScratch &scratch) -> CoarsePathResult
template<typename OtherWorld>
auto is_region_graph_fresh (const OtherWorld &world, const RegionGraphT< typename OtherWorld::residency_type > &graph) noexcept -> bool

Detailed Description

template<typename Residency>
class tess::RegionGraphT< Residency >

Region graph storage specialized by dense or sparse residency policy.

Owns topology and process-local class/provider identity for one world.

Do not compare or share a graph across a dynamic-library boundary; rebuild it in the linked image that queries it.

◆ build_region_graph

template<typename Residency>
template<typename World, typename ClassOrTag, typename Provider>
auto build_region_graph ( const World & world,
LocalTopologyScratch & scratch,
RegionGraphT< typename World::residency_type > & graph,
const Provider & provider = {} ) -> RegionGraphBuildResult
friend

Rebuilds a complete region graph for the world's current resident set.

Deliberately NOT [[nodiscard]], unlike update_region_graph. The returned status is invariantly Built: the dense branch iterates keys 0..chunk_count, so InvalidChunk cannot arise and MissingChunk does not exist under AlwaysResident; the sparse branch builds from resident_chunk_keys(), which are in-world and resident by construction. What remains in the result is statistics, and the graph itself is the output. update_region_graph does have a reachable failure – InvalidChunk for an out-of-range dirty chunk – and is marked accordingly.


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