Compile a resident surface into a conservative whole-feature separation
query.
The mesh is snapshotted, so changing its positions or indices later needs a
new query. Open sheets, disconnected components and degenerate triangles are
admitted, since unsigned separation needs no winding, closure or volume.
representation chooses whether the snapshot measures the source binary64
coordinates or their Float32 roundings, the buffer an exporter will write;
both keep the binary64 coordinates as the reference for attachment seats.
Original triangle ordinals survive the hierarchy's reordering.
A call takes a feature, a nonempty finite XYZ vertex run in the same metre
frame measured as its convex hull, a nonnegative requested clearance and a
caller-owned work budget. It bounds the feature's separation from every
resident triangle: a hierarchy box is skipped only when an enclosed axis
projection already proves the requested clearance, and every remaining
triangle is bounded by boundAutoMovieConvexSeparation. This is neither ray
sampling nor a nearest-corner test. certified means the complete feature
is at least the clearance away, and at zero clearance strictly positive;
false means unproved, including touches, crossings and rounding at an exact
limit, and neither diagnoses penetration nor selects a closest point.
lowerBound is capped at the clearance, or is the smallest positive double
at zero clearance, which is a proof threshold rather than a distance
estimate; triangle is the original ordinal of the triangle that lowered it
below that cap, the lowest on ties, or -1 when none did.
At zero clearance, a three-vertex fan may carry attachment metadata: its
root's canonical barycentric seat on a source triangle and the original
triangles incident to that seat. The root must equal that seat exactly, in
the snapshot's representation, and each support must contain the seat's
supporting corners. Each support must then bound the whole fan's contact
through boundAutoMovieTriangleAttachmentContact, reported as an
attachmentCaps entry, and every other triangle still needs strict positive
separation. Such a result reports lowerBound zero, because certification
is that combined proof and not positive separation. Without metadata a fan
touching its root is simply unproved.
Compilation throws on an unknown representation, a malformed or empty index
buffer, a non-finite position, or a Float32 rounding that overflows.
Every visited box, with its up to three axis projections, spends one budget
unit, and every tested support, triangle, normal triple, projection axis and
edge pair spends one more before its work. Exhaustion and malformed input
throw by name; the caller owns the spent count and must not reset it during
refinement. A failed call accepts no geometry and retries nothing. The
returned query's separated runs the same walk and stops at the first
triangle whose bound falls below the target; since the running bound only
falls, its decision equals the full measurement's and it never spends more.
Compile a resident surface into a conservative whole-feature separation query.
The mesh is snapshotted, so changing its positions or indices later needs a new query. Open sheets, disconnected components and degenerate triangles are admitted, since unsigned separation needs no winding, closure or volume.
representationchooses whether the snapshot measures the source binary64 coordinates or their Float32 roundings, the buffer an exporter will write; both keep the binary64 coordinates as the reference for attachment seats. Original triangle ordinals survive the hierarchy's reordering.A call takes a feature, a nonempty finite XYZ vertex run in the same metre frame measured as its convex hull, a nonnegative requested clearance and a caller-owned work budget. It bounds the feature's separation from every resident triangle: a hierarchy box is skipped only when an enclosed axis projection already proves the requested clearance, and every remaining triangle is bounded by
boundAutoMovieConvexSeparation. This is neither ray sampling nor a nearest-corner test.certifiedmeans the complete feature is at least the clearance away, and at zero clearance strictly positive; false means unproved, including touches, crossings and rounding at an exact limit, and neither diagnoses penetration nor selects a closest point.lowerBoundis capped at the clearance, or is the smallest positive double at zero clearance, which is a proof threshold rather than a distance estimate;triangleis the original ordinal of the triangle that lowered it below that cap, the lowest on ties, or -1 when none did.At zero clearance, a three-vertex fan may carry attachment metadata: its root's canonical barycentric seat on a source triangle and the original triangles incident to that seat. The root must equal that seat exactly, in the snapshot's representation, and each support must contain the seat's supporting corners. Each support must then bound the whole fan's contact through
boundAutoMovieTriangleAttachmentContact, reported as anattachmentCapsentry, and every other triangle still needs strict positive separation. Such a result reportslowerBoundzero, because certification is that combined proof and not positive separation. Without metadata a fan touching its root is simply unproved.Compilation throws on an unknown representation, a malformed or empty index buffer, a non-finite position, or a Float32 rounding that overflows. Every visited box, with its up to three axis projections, spends one budget unit, and every tested support, triangle, normal triple, projection axis and edge pair spends one more before its work. Exhaustion and malformed input throw by name; the caller owns the spent count and must not reset it during refinement. A failed call accepts no geometry and retries nothing. The returned query's
separatedruns the same walk and stops at the first triangle whose bound falls below the target; since the running bound only falls, its decision equals the full measurement's and it never spends more.