luft/tests.lisp
Boundary squared remains the chain-level topological invariant.
The value is immutable through its public vector view.
Representatives of the two singular mechanisms and the maximally crossed checkerboard resolve into the intended ordinary sheets.
This is the deliberate spike boundary: its occupied-side cycle needs a covered junction and cannot be disguised as an ordinary eight-bit star.
Exact per-plane doubled-area signature, including render attributes.
A four-chunk world with solids straddling every seam and the world box.
A cross over both interior seams, and both world-box corners.
Run the retained topology and replacement manifold-sheet mesh claims.
(form &optional note)((name) &body body)(thunk)(domain sites)(domain &key (initial-capacity 0))(&key (code t))(builder site)(builder)(domain site)(function domain site)(&key (horizontal-bits 6)
(x-bits horizontal-bits)
(y-bits horizontal-bits))(domain x y z &optional (extent +vertex-extent+) (polarity 1))Pack a canonical site inside DOMAIN's box. No coordinate wraps: anchors range over [0, limit] per horizontal axis, and a site extending along an axis cannot begin on that axis's far boundary.
(solid-chain)Test whether two compatible scalars are equal.
(chain)(domain thing)(site)(chain x y z)Treat positive cubic-site occurrences in CHAIN as Boolean occupancy. Cells above and below the Z range are air; probes beyond the horizontal box signal OUTSIDE-DOMAIN with the boundary restarts.
(domain site axis)(chain)(chain)(chain)(left right)Test whether one compatible scalar is less than another.
(mask)(mask)(mask)Resolve MASK into the regular occupied-side masks supported by this spike. The returned list has one regular mask per simple boundary-link cycle. Empty and full stars have no boundary and therefore return NIL. A cycle which needs duplicated radial vertices cannot yet be represented by the Blender regular star…
(mask &key (centre '(8 8 8)))Sample a two-dimensional texture through a sampler at a UV coordinate.
Addition over compatible quantities.
(function mesh)Multiplication and scalar scaling.
Subtraction or unary negation.
Extract the unsigned bit field (BYTE SIZE POSITION) of one unsigned scalar.
(left right)Logical disjunction of tests and raw truth values.
Logical conjunction of tests and raw truth values.
The non-negative remainder of integer division.
(mesh)(left right)(left right)(function mesh)(a b c)(left right)Division of two represented quantities.
(left right)(mesh instance-words low high)Test whether one compatible scalar is at most another.
(mesh site)(normal)(solid &key (stock-function (constantly 0))
(chamfer-stock-function (lambda (stocks) (first stocks)))
(bevel-width +mesh-bevel-width+)
(boundary :air))Classify SOLID into exact integer face, edge, and vertex instance streams. Below the medial limit, every exposed cell face emits the same width-dependent central square and crease edges own the intervening bands. At the half-cell limit those two families become zero-area seams: a sub-medial witness retains their…
Logical negation of one test or raw truth value.
(mesh)Dissolve only interior edges between exactly coplanar equal-attribute faces. The output has the same points, oriented planes, stocks, ambient values, silhouette, and depth as MESH. Groups with a non-simple boundary retain their original triangles, making the unmerged medial mesh a local rebuild oracle.
(witness width-function &key (contract-t-junctions-p t))Evaluate one width-one WITNESS at a locally selected width per vertex site. WIDTH-FUNCTION is called once for each canonical lattice vertex as (WIDTH-FUNCTION X Y Z INCIDENT-STOCKS) where INCIDENT-STOCKS is a sorted list of the packed stocks on witness triangles using that site. It must return an integer width…
The maximum of compatible quantities.
(meshes)A simple Org table without formulas.
(left right)(function chain)A probe crossed into a chunk that is not resident in the probing field. The signaling probe offers USE-CHUNK (supply the chunk's chain), plus the TREAT-AS-AIR and TREAT-AS-SOLID boundary restarts for the whole chunk, so a streaming store answers with data, defers, or fills with a constant.
A cell probe left its box. The signaling probe offers the boundary restarts TREAT-AS-AIR, TREAT-AS-SOLID, and USE-VALUE, so the caller's handler decides what lies past the edge: a world treats it as air, a chunk store answers from the neighboring chunk or defers, a test refuses.
(chunk chunk-key
&key (stock-function (constantly 0))
(chamfer-stock-function (lambda (stocks) (first stocks)))
(bevel-width +mesh-bevel-width+)
planar-merge-p
coplanar-merge-p)Classify one chunk's solid CHUNK into the instance-stream ABI. CHUNK holds exactly the cells of the chunk named by CHUNK-KEY. Probes leaving the chunk signal MISSING-CHUNK once per neighboring chunk -- bind a handler that answers USE-CHUNK from a store, or TREAT-AS-AIR to fill in -- and probes past the world's box…
(&key (stream *standard-output*))
Focused executable claims for the retained topology and the replacement manifold-sheet mesher.