112 3D: Clipping, sections, and transparency
3D reference map · First 3D picture
Render clipping and geometric slicing are distinct operations. clip3d keeps its source subtree intact and clips only the triangles submitted to a view3d renderer. slice-mesh3d instead returns new half-space mesh geometry; it deliberately does not invent a cap. Use section-by-plane3d for the actual plane intersection and section-curve3d to draw every loop or open chain as ordinary spatial curves.
procedure
(clip-plane3d plane [#:keep keep]) → clip-plane3d?
plane : plane3? keep : (or/c 'positive 'negative) = 'positive
procedure
(clip-plane3d? value) → boolean?
value : any/c
procedure
content : spatial-visual? clip : (or/c plane3? clip-plane3d?) id : symbol?
procedure
(slice-mesh3d mesh clip) → mesh3d?
mesh : mesh3d? clip : (or/c plane3? clip-plane3d?)
procedure
(vertex-color-lerp first second amount) → color-spec?
first : color-spec? second : color-spec? amount : finite-real?
procedure
(slice-mesh-by-planes3d mesh clips) → mesh3d?
mesh : mesh3d? clips : (listof (or/c plane3? clip-plane3d?))
procedure
(section-by-plane3d mesh clip) → section3d?
mesh : mesh3d? clip : (or/c plane3? clip-plane3d?)
procedure
(section3d? value) → boolean?
value : any/c
procedure
(section3d-loops section) → (listof (listof vec3?))
section : section3d?
procedure
(section3d-chains section) → (listof (listof vec3?))
section : section3d?
procedure
(section-curve3d mesh clip #:id id) → group3d?
mesh : mesh3d? clip : (or/c plane3? clip-plane3d?) id : symbol?
material3d accepts an alpha-bearing semantic colour. In an opaque view3d, fully opaque geometry writes the depth buffer first; transparent geometry is then rendered far-to-near with 'object-sorted or 'triangle-sorted #:transparency-mode. Transparent triangles depth-test against opaque geometry but do not write depth. A projected-label accepts #:occlusion 'always-visible, 'hide, or 'fade; its occlusion test uses that opaque depth target, preserving the label as a crisp 2D Visual.