Expand description
Chunked terrain streaming system.
Manages the loading, unloading, caching, and mesh generation of terrain chunks around a moving viewer. Provides:
ChunkCoord— integer 2D chunk addressChunkState— lifecycle state machine (Unloaded/Loading/Loaded/Unloading)- Priority queue ordered by distance-to-viewer
- Async-style load queue (single-threaded work queue, drain-per-frame)
- Mesh cache with LRU eviction
- Collision hull generation per chunk
Structs§
- Aabb
- Axis-aligned bounding box in world space.
- Chunk
Coord - Integer 2D address of a terrain chunk in chunk-space.
- Chunk
GenConfig - Configuration for chunk generation.
- Chunk
Generator - Generates terrain chunk data synchronously.
- Chunk
Serializer - Simple in-memory serializer/deserializer for heightmaps. (In a real engine, this would write to disk.)
- Chunk
Streaming Manager - The main terrain streaming manager.
- Collision
Hull - A simplified collision representation for a terrain chunk.
- Load
Queue - Async-style load queue: accepts load requests, drains N per frame.
- LodScheduler
- Determines which LOD level a chunk should be rendered at.
- Mesh
Cache - LRU mesh cache for terrain chunks.
- Prefetcher
- Predicts where the viewer will be and pre-queues chunks.
- Streaming
Config - Configuration for the streaming manager.
- Streaming
Stats - Runtime statistics for the streaming system.
- Terrain
Chunk Data - All data for a single loaded terrain chunk.
- Terrain
Mesh - A simple triangle mesh generated from a heightmap.
- Visibility
Set - Tracks which chunks are visible this frame.
Enums§
- Chunk
State - Lifecycle state of a terrain chunk.