dayzmake_core/navmesh/detour/mod.rs
1//! The DayZ `.nm` navmesh set file and its Detour tile layout (spec 8.1, 9 and 7.2).
2//!
3//! A `.nm` file ([`NavMeshSet`]) is a header, an offset table and tile records. Each record holds one
4//! Detour tile blob ([`TileData`]): standard Detour tile data (version 12, 64-bit polygon refs) with a
5//! 4-byte header extension, 44-byte off-mesh connections and a trailing extra section
6//! ([`TileExtra`]). All integers and floats are little-endian.
7//!
8//! Every reader treats its input as hostile: counts are checked with checked arithmetic against the
9//! bytes available before anything is allocated, and errors are returned instead of panics.
10
11mod common;
12mod create;
13mod mesh;
14mod query;
15mod set;
16mod tile;
17
18pub(crate) use create::stored_off_mesh;
19pub use create::{CreateParams, OffMeshInput, create_tile_data};
20pub use mesh::NavMesh;
21pub use query::find_nearest_poly;
22pub use set::{
23 NavMeshParams, NavMeshSet, SET_MAGIC, SET_VERSION, SET_VERSION_OLD, SetTile, decode_poly_ref,
24 encode_poly_ref,
25};
26pub use tile::{
27 BvNode, Link, MeshHeader, NAVMESH_MAGIC, NAVMESH_VERSION, Obstacle, OffMeshConnection, Poly,
28 TileData, TileExtra, TilePart, TilePartPoly,
29};