Skip to main content

box3d_rust/height_field/
mod.rs

1//! Height field collision shape.
2//!
3//! Port of `box3d-cpp-reference/src/height_field.c` and the height-field group of
4//! `include/box3d/types.h` / `collision.h`.
5//!
6//! Layout:
7//! - `types`    — HeightFieldDef/Data, edge flags, blob serialization
8//! - `create`   — create/destroy and convexity flags
9//! - `factory`  — grid/wave helpers, dump/load
10//! - `triangle` — cell corners and triangle accessors
11//! - `cast`     — AABB, ray cast, shape cast
12//! - `query`    — overlap, query, mover collide
13//!
14//! SPDX-FileCopyrightText: 2026 Erin Catto
15//! SPDX-License-Identifier: MIT
16
17mod cast;
18mod create;
19mod factory;
20mod query;
21mod triangle;
22mod types;
23
24pub use cast::{compute_height_field_aabb, ray_cast_height_field, shape_cast_height_field};
25pub use create::{create_height_field, destroy_height_field};
26pub use factory::{create_grid, create_wave, dump_height_data, load_height_field};
27pub use query::{collide_mover_and_height_field, overlap_height_field, query_height_field};
28pub use triangle::{get_height_field_material, get_height_field_triangle};
29pub use types::{
30    convert_bytes_to_height_field, get_height_field_compressed_heights, get_height_field_flags,
31    get_height_field_material_indices, get_height_field_triangle_count, HeightFieldData,
32    HeightFieldDef, CONCAVE_EDGE1, CONCAVE_EDGE2, CONCAVE_EDGE3, HEIGHT_FIELD_DATA_SIZE,
33    HEIGHT_FIELD_HOLE, HEIGHT_FIELD_VERSION, INVERSE_CONCAVE_EDGE1, INVERSE_CONCAVE_EDGE2,
34    INVERSE_CONCAVE_EDGE3,
35};