Expand description
Geometry helpers over Build-style sector/wall data.
Conventions: x grows east, y grows south, z grows down. Angles use 2048 units per full turn, 0 = east, 512 = south. One xy unit equals 16 z units.
Structs§
- PlaneEq
- Linear plane equation
z = a + bx * x + by * yfor a (possibly sloped) sector plane.
Constants§
- ANGLE_
UNITS - STAT_
SLOPED - Sloped-plane flag in ceiling/floor stat.
Functions§
- ang_
to_ rad - ceil_eq
- floor_
eq - inside_
sector - Even-odd point-in-sector test (handles inner loops).
- plane_
eq - ray_
segment - Ray/segment intersection. Returns
(t, s)where the hit point iso + d*tandsin[0,1]is the position along the segmenta -> b. - update_
sector - Finds the sector containing (x, y), searching neighbours of
hintfirst. - update_
sector_ z - Like
update_sectorbut also requires z to lie between ceiling and floor. - zs_
of_ slope - Ceiling and floor z of sector
sat point (x, y).