luft/mesh-variation-policy.lisp
Iterate mesh's packed triangles with scalar coordinates and no callback.
This is the dense-loop counterpart to %map-surface-mesh-triangle-records.
The latter deliberately materializes convenient point and normal lists for
cold transformations and inspection; performance-sensitive compilers should
keep the packed instance/template representation through their inner loop.
Decode one nonnegative width-one tick coordinate without materialization.
Return the scalar owner site and local direction for a witness point.
Pack a world-domain tick point into one lexicographically ordered fixnum.
Emit one global-tick triangle without point, base, origin, or normal lists.
Return the canonical lattice site and local direction owning point.
point must come from a width-one luft surface, so every coordinate is exactly
on, one tick above, or one tick below its owning lattice plane.
Whether stock-masks can use the bounded direct page directory for domain.
Zero is the unobserved-site sentinel inside a page. Wider or zero masks retain the fully general EQL hash compiler below.
Fold a positive byte stock lane through sparse 8-cubed pages.
Return the sparse or dense realized width field, its exact site count and maximum width, and its inclusive coordinate bounds. Pages are only the one-pass accumulation language; the returned field has the same tight layout used by the generic compiler and all realization passes.
The policy compiler above chooses one of two deliberately equivalent representations. Downstream transition planning and emission share this small immutable view instead of growing another all-in-one compiler function merely to keep the field's representation details lexical.
Execute body with an inline site-width lookup over field.
The representation is unpacked once around an entire planning or emission stage, keeping the scalar triangle loop independent of the policy compiler without paying structure-access or generic-call costs per vertex.
Bind the exact site-width transform of one width-one witness triangle.
((mesh kind stock ambient mask
ax ay az bx by bz cx cy cz)
&body body)Iterate MESH's packed triangles with scalar coordinates and no callback. This is the dense-loop counterpart to %MAP-SURFACE-MESH-TRIANGLE-RECORDS. The latter deliberately materializes convenient point and normal lists for cold transformations and inspection; performance-sensitive compilers should keep the packed…
(function mesh)Addition over compatible quantities.
Subtraction or unary negation.
Multiplication and scalar scaling.
Headings, paragraphs, figures and their IDs, mentions, marks.
Test whether two compatible scalars are equal.
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(coordinate)(site)(site)(site)(point)(point)(point)(left right)Logical conjunction of tests and raw truth values.
(ax ay az bx by bz cx cy cz)(builder kind stock ambient mask nx ny nz
ax ay az bx by bz cx cy cz)The minimum of compatible quantities.
(scratch offset kind-code boundary-edge-mask
ax ay az bx by bz cx cy cz nx ny nz)(builder kind base-x base-y base-z stock
ambient-occlusion count)(point)Return the canonical lattice site and local direction owning POINT. POINT must come from a width-one LUFT surface, so every coordinate is exactly on, one tick above, or one tick below its owning lattice plane.
(&key (code t))(loop normal)(x y z x0 y0 z0 y-span z-span)(domain stock-masks site-widths)(domain)(domain)Test whether one compatible scalar is at most another.
(owner-witnesses stock-masks site-widths width-census)Fold a positive byte stock lane through sparse 8-cubed pages. Return the sparse or dense realized width field, its exact site count and maximum width, and its inclusive coordinate bounds. Pages are only the one-pass accumulation language; the returned field has the same tight layout used by the generic compiler and…
(&optional (text *page*) (name "test"))The maximum of compatible quantities.
Test whether one compatible scalar is less than another.
Logical disjunction of tests and raw truth values.
(x y z)((site-width) field &body body)Execute BODY with an inline SITE-WIDTH lookup over FIELD. The representation is unpacked once around an entire planning or emission stage, keeping the scalar triangle loop independent of the policy compiler without paying structure-access or generic-call costs per vertex.
((tax tay taz tbx tby tbz tcx tcy tcz)
site-width ax ay az bx by bz cx cy cz
&body body)
Budget every possible page plus a conservative two-word directory entry. The actual directory is one pointer per page, so this keeps the fast path bounded without depending on implementation-specific object sizes.