//! MDL 3D-model decoder — parses FFXIV model files into structural data.
//!
//! The central entry point is [`Mdl::parse`], which borrows a byte slice and returns a
//! zero-copy view over all model sections.
//!
//! Key types:
//!
//! - [`Mdl`] — top-level parsed model; exposes headers, mesh tables, bone tables, shapes, and
//!   raw vertex/index buffer views.
//! - [`ModelFileHeader`] / [`ModelHeader`] — the two-header layout at the start of the file.
//! - [`Lod`] / [`ExtraLod`] — level-of-detail definitions; there are always [`LOD_COUNT`] of each.
//! - [`Mesh`] / [`Submesh`] — mesh and submesh descriptors referencing the vertex/index buffers.
//! - [`BoneTable`] — per-mesh bone palettes; supports both the legacy format and the Dawntrail
//!   v2 format introduced at version `0x01000006`.
//! - [`VertexDeclaration`] / [`VertexElement`] — vertex stream layouts.
//! - [`Shape`] / [`ShapeMesh`] / [`ShapeValue`] — morph target (shape key) data.
//! - [`BoundingBox`] — axis-aligned bounding boxes used for culling.

mod bone;
mod bounding_box;
mod header;
mod lod;
mod mesh;
mod parser;
mod shape;
mod vertex;

pub use bone::{BONE_TABLE_BONE_SLOTS, BoneTable, BoneTableVersion};
pub use bounding_box::BoundingBox;
pub use header::{
    MODEL_FILE_HEADER_SIZE, MODEL_HEADER_SIZE, ModelFileHeader, ModelFlags1, ModelFlags2,
    ModelHeader,
};
pub use lod::{ELEMENT_ID_SIZE, ElementId, ExtraLod, LOD_SIZE, Lod};
pub use mesh::{
    MESH_SIZE, Mesh, SUBMESH_SIZE, Submesh, TERRAIN_SHADOW_MESH_SIZE, TERRAIN_SHADOW_SUBMESH_SIZE,
    TerrainShadowMesh, TerrainShadowSubmesh,
};
pub use parser::{LOD_COUNT, Mdl};
pub use shape::{SHAPE_MESH_SIZE, SHAPE_SIZE, SHAPE_VALUE_SIZE, Shape, ShapeMesh, ShapeValue};
pub use vertex::{
    VERTEX_DECLARATION_SLOT_BYTES, VERTEX_ELEMENT_SIZE, VERTEX_ELEMENT_SLOTS, VertexDeclaration,
    VertexElement, VertexUsage,
};
