luft/mesh-compression.lisp
Return oriented boundary loops, or NIL when the union is not simple.
Ear-clip one positively oriented simple integer polygon.
Return mesh's exact triangles with every primitive edge marked visible.
The geometry, stock, ambient value, primitive class, and winding are retained. Only the three construction-mask bits change. This diagnostic realization exposes connectivity that the ordinary semantic edge mask intentionally hides; it must not be substituted for the production mesh outside topology captures.
Return only the triangles incident to the three points in split.
split is (LEFT MIDDLE RIGHT), as reported in the :CANDIDATE-SPLITS bevel
diagnostic. A triangle is retained when two or more of its vertices are
split points, so the result is the smallest actual mesh patch that contrasts
one long edge with its two short neighbours. Every retained edge is marked
visible; no vertex or triangle geometry is otherwise changed. This is the
executable closeup used by the mixed-bevel degeneracy atlas. #WSEK3C
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.
Return mesh with only exact coplanar interior edges dissolved.
This is an explicit cold compression/diagnostic transform, never an alternate
mode of mesh-chunk or the variable-width topology producer. mesh is not
modified; groups whose boundary is not simple retain their original
triangles.
(triangles)(left right)Test whether two compatible scalars are equal.
(left right)(point a b c normal)Logical conjunction of tests and raw truth values.
Logical negation of one test or raw truth value.
Test whether one compatible scalar is at least another.
(left right)(a b c)(loop normal)Test whether one compatible scalar is less than another.
Test whether one compatible scalar is greater than another.
The non-negative remainder of integer division.
(builder kind stock ambient mask normal triangle)The minimum of compatible quantities.
Multiplication and scalar scaling.
(scratch offset kind-code boundary-edge-mask
ax ay az bx by bz cx cy cz nx ny nz)Subtraction or unary negation.
(builder kind base-x base-y base-z stock
ambient-occlusion count)(mesh)Return MESH's exact triangles with every primitive edge marked visible. The geometry, stock, ambient value, primitive class, and winding are retained. Only the three construction-mask bits change. This diagnostic realization exposes connectivity that the ordinary semantic edge mask intentionally hides; it must not…
(function mesh)(builder)(mesh split)Return only the triangles incident to the three points in SPLIT. SPLIT is (LEFT MIDDLE RIGHT), as reported in the :CANDIDATE-SPLITS bevel diagnostic. A triangle is retained when two or more of its vertices are split points, so the result is the smallest actual mesh patch that contrasts one long edge with its two…
(left right)(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.
Logical disjunction of tests and raw truth values.
(mesh)Return MESH with only exact coplanar interior edges dissolved. This is an explicit cold compression/diagnostic transform, never an alternate mode of MESH-CHUNK or the variable-width topology producer. MESH is not modified; groups whose boundary is not simple retain their original triangles.
(chunk chunk-key
&key (stock-function (constantly 0))
source-stock-function
(chamfer-stock-function (lambda (stocks) (first stocks)))
(bevel-width +mesh-bevel-width+))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…
The first material-width experiment makes the site's ownership concrete. Every packed surface stock compiles once to a terrain or architecture bit; each canonical lattice vertex ORs the bits of its incident stocks and chooses one width for every primitive that uses it. Terrain-only sites take width four,…
Retain collinear boundary vertices: another coplanar attribute group or differently oriented plane may meet there. Removing such a vertex would preserve the continuous surface but introduce a topological T-junction.