nx_collision_aabb.nx
buildroot/runtime/nx_collision_aabb.nx
about
nx_collision_aabb.nx -- axis-aligned bounding box collision (Q14).
Fixed-point collision primitive. Used by game-engine for:
- player vs voxel (post-raycast solid-block resolution)
- player vs entity (NPCs, items, projectiles)
- ray vs AABB (efficient broad-phase)
Q14 throughout — no float. Composes with nx_q14_math + nx_raycast_voxel.
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nxnx_q14_math.nx
imported by: nx_collision_aabb_test.nxnx_game_runtime_compose_test.nx
structs
| 22 | struct NxAabb |
consts
| 13 | const NX_MAGIC_2147483647: i64 = 2147483647 |
| 15 | const NX_AABB_NO_OVERLAP: nx_int = 0 |
| 16 | const NX_AABB_OVERLAP: nx_int = 1 |
functions
| 31 | func nx_aabb_new(min_x: nx_int, min_y: nx_int, min_z: nx_int, |
| 43 | func nx_aabb_from_voxel(vx: nx_int, vy: nx_int, vz: nx_int) -> *NxAabb |
| 53 | func nx_aabb_overlap(a: *NxAabb, b: *NxAabb) -> nx_int |
| 65 | func nx_aabb_contains_point(b: *NxAabb, called by 1: main |
| 80 | func nx_aabb_translate(b: *NxAabb, dx_q14: nx_int, dy_q14: nx_int, dz_q14: nx_int) -> nx_int |
| 96 | func nx_aabb_intersect_ray(b: *NxAabb, |