Skip to main content

Module opticast

Module opticast 

Source
Expand description

Per-frame orchestrator — wires the R4.1 builders into a single opticast entry point.

Port of the top-of-opticast execution order in voxlap5.c:opticast (lines 2284..end-of-function), minus the globals voxlap mutates inline:

  1. camera_math::derive → per-frame f32 basis.
  2. opticast_prelude::derive_prelude → integer / fixed-point cache.
  3. column_walk::camera_column_air_gap → early-out if the camera is inside solid voxel material.
  4. projection::derive_projection → cx / cy / corner-cut quad.
  5. ray_step::derive_ray_step → per-pixel ray-step coefficients.
  6. Four-quadrant scan dispatch (top, right, bottom, left).

OpticastSettings bundles the constants the four-quadrant scan loops need (xres / yres / projection params / mip + scan-dist controls) so the orchestrator’s signature stays compact.

Structs§

OpticastSettings
Per-frame settings the orchestrator forwards to the builders. Most fields map 1:1 onto a voxlap global (vx5.anginc, vx5.mipscandist, vx5.maxscandist) or a setcamera argument (dahx / dahy / dahz). mip_levels is voxlap’s gmipnum1 for the oracle scene.

Enums§

OpticastOutcome
Outcome of one opticast call.

Functions§

opticast
Drive one frame of opticast. The caller supplies: