Expand description
S1.1 — ray ↔ axis-aligned bounding box clip helper.
Standard slab-method intersection. Used by the S1 outside-camera
dispatch (opticast.rs) to find the t-parameter at which an
outside-the-grid camera ray first enters the world’s column AABB,
so gline can be initialised at that face hit instead of at the
camera origin (which sits past vsid).
Will also be reused by S5 (per-grid rotation: each grid’s grid-local ray gets clipped against the grid’s local AABB before the cross-chunk DDA starts) and S6 (LOD selection: distance to the AABB is part of the near/mid/far classifier).
Functions§
- clip_
ray_ to_ aabb - Intersect a ray
origin + t * diragainst the axis-aligned box[aabb_min, aabb_max]and returnSome((t_enter, t_exit))if the ray hits the box at any t, elseNone. - clip_
ray_ to_ xy_ aabb - 2D slice of
clip_ray_to_aabbin the XY plane only — what S1.2 actually needs at the dispatch level. Voxlap’s column grid is indexed by(cx, cy); Z is handled inside each column’s slab data, so the per-frame outside check only cares about whether a ray ever enters the XY footprint of the grid.