Expand description
Dynamic obstacle management and tile caching for navigation meshes
This crate provides tile-based navigation mesh management with support for runtime obstacle addition and removal. It enables dynamic environments where obstacles can be added or removed without regenerating the entire navmesh.
§Features
- Tile Caching: Compressed storage of navigation mesh tiles
- Dynamic Obstacles: Add/remove cylinder, box, and oriented box obstacles
- Incremental Updates: Rebuild only affected tiles when obstacles change
- Compression: LZ4 compression for efficient tile storage
- Streaming: Support for large worlds through tile streaming
§Example
use waymark_tilecache::{TileCache, TileCacheParams};
let mut params = TileCacheParams::default();
params.max_obstacles = 128;
let mut tile_cache = TileCache::new(params)?;
// Add a cylinder obstacle
let obstacle_id = tile_cache.add_obstacle(
[10.0, 0.0, 10.0], // position
2.0, // radius
4.0, // height
)?;
tile_cache.update()?;
// Remove the obstacle later
tile_cache.remove_obstacle(obstacle_id)?;
tile_cache.update()?;§Architecture
The tile cache system manages navigation data in tiles:
TileCache: Main cache managing tiles and obstaclesTileCacheBuilder: Builds compressed tile dataTileCacheLayer: Tile layer data for caching
Re-exports§
pub use error::TileCacheError;pub use tile_cache::*;pub use tile_cache_builder::*;pub use tile_cache_data::*;pub use tile_cache_integration::*;
Modules§
- error
- Error types for the waymark-tilecache crate
- tile_
cache - Tile cache implementation for Detour
- tile_
cache_ builder - Tile cache builder for real-time mesh rebuilding
- tile_
cache_ data - Tile cache data structures and serialization
- tile_
cache_ integration - Integration between TileCache and NavMesh for real-time updates