waymark_tilecache/lib.rs
1//! Dynamic obstacle management and tile caching for navigation meshes
2//!
3//! This crate provides tile-based navigation mesh management with support for
4//! runtime obstacle addition and removal. It enables dynamic environments where
5//! obstacles can be added or removed without regenerating the entire navmesh.
6//!
7//! # Features
8//!
9//! - **Tile Caching**: Compressed storage of navigation mesh tiles
10//! - **Dynamic Obstacles**: Add/remove cylinder, box, and oriented box obstacles
11//! - **Incremental Updates**: Rebuild only affected tiles when obstacles change
12//! - **Compression**: LZ4 compression for efficient tile storage
13//! - **Streaming**: Support for large worlds through tile streaming
14//!
15//! # Example
16//!
17//! ```no_run
18//! use waymark_tilecache::{TileCache, TileCacheParams};
19//!
20//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
21//! let mut params = TileCacheParams::default();
22//! params.max_obstacles = 128;
23//! let mut tile_cache = TileCache::new(params)?;
24//!
25//! // Add a cylinder obstacle
26//! let obstacle_id = tile_cache.add_obstacle(
27//! [10.0, 0.0, 10.0], // position
28//! 2.0, // radius
29//! 4.0, // height
30//! )?;
31//!
32//! tile_cache.update()?;
33//!
34//! // Remove the obstacle later
35//! tile_cache.remove_obstacle(obstacle_id)?;
36//! tile_cache.update()?;
37//! # Ok(())
38//! # }
39//! ```
40//!
41//! # Architecture
42//!
43//! The tile cache system manages navigation data in tiles:
44//!
45//! - [`TileCache`]: Main cache managing tiles and obstacles
46//! - [`TileCacheBuilder`]: Builds compressed tile data
47//! - [`TileCacheLayer`]: Tile layer data for caching
48
49pub mod error;
50pub mod tile_cache;
51pub mod tile_cache_builder;
52pub mod tile_cache_data;
53pub mod tile_cache_integration;
54
55pub use error::TileCacheError;
56pub use tile_cache::*;
57pub use tile_cache_builder::*;
58pub use tile_cache_data::*;
59pub use tile_cache_integration::*;