Skip to main content

Module compile_10d

Module compile_10d 

Source
Expand description

Compile a Mesh into a sealed .10d container (the dense compiled-geometry sidecar) and read it back — the “mesh → .10d” step of the 3-D-anatomy asset pipeline. Compile an imported triangle Mesh into a sealed .10d container — the dense compiled-geometry half of a geometry asset (see docs/manuals/standards/geometry-asset-ontology.md §3). This is the “mesh → .10d” step of the 3-D-anatomy asset pipeline: the renderer and the anatomy layer read the .10d back with decode_10d_mesh instead of reparsing the source GLB, and the q42 semantic manifest cites the container’s compiled_digest.

Scope (honest): emits a QuantizedMesh section (u16-quantized vertices in the bbox + u16/u32 indices). Optional Tensor10DNodes (D1), provenance sidecars, and on native / wasm-scientific builds optional Topology + SpatialIndex sections (C3) for scan-free picking. LOD chain from decimate_3 remains a separate pre-compile step.

Structs§

Compile10dExtras
Optional extra sections for vision / recon seals (programme C3).
CompiledAsset
A fully compiled geometry asset: the source-imported Mesh, the sealed .10d container, its two content digests, and the q42 semantic manifest that cites the container by compiledDigest (geometry-asset-ontology §1 two-layer model).

Enums§

Compile10dError
Failure modes for .10d compilation and read-back.

Functions§

compile_asset
The end-to-end asset-compile step: source asset bytes → CompiledAsset.
compile_developmental_asset
Like compile_asset but binds the compiled asset to a point on the developmental t-axis — its gestational_age_days (postfertilization) and carnegie_stage. This is the compile step for a fetal/ embryonic stage: consecutive stages, ordered by gestational age, form a 4-D developmental body (the maternal–fetal dyad’s fetal side, reproductive-continuum plan §2).
compile_mesh_to_10d
Compile a mesh into a sealed .10d container holding one QuantizedMesh section. The whole-file CRC-32C is written (the container is self-verifying).
compile_mesh_to_10d_vision
Vision recon seal: mesh + nodes + Topology + SpatialIndex when CG is linked (C3).
compile_mesh_to_10d_vision_with_provenance
Vision recon seal + in-envelope provenance (D4).
compile_mesh_to_10d_with_extras
Full seal with explicit extras (topology / spatial index).
compile_mesh_to_10d_with_extras_and_frames
Full seal with optional color reading and vertex frame fields plus topology/spatial extras.
compile_mesh_to_10d_with_frames
Compile authored vertex normals and tangent handedness in an optional FieldSidecar.
compile_mesh_to_10d_with_nodes
Compile mesh + optional Tensor10D nodes (vision detections / σ paint fuel).
compile_mesh_to_10d_with_nodes_and_provenance
Full vision/recon seal: mesh + nodes + optional provenance (no topology extras).
compile_mesh_to_10d_with_normals
Compile a mesh and preserve a vertex-aligned authored normal stream in an optional .10d FieldSidecar. The existing QuantizedMesh payload remains unchanged.
compile_mesh_to_10d_with_provenance
Compile a mesh into a sealed .10d, optionally bundling a provenance sidecar physically inside the container (P1) — the immutable source bytes + licence (+ optional VC) the asset was derived from, so context is byte-inseparable: a .10d copied on its own still carries what it came from and under what licence. The renderer’s governance path treats the presence of this section as the attestation that makes the mesh citable (see render/portal/mod.rs).
compile_mesh_to_10d_with_surface_reading
Seal mesh + provenance + a per-vertex surface colour reading. The reading length must equal the vertex count. One organ albedo is not a substitute: callers that have no reading use the provenance-only seal.
compile_organ_asset
Like compile_asset but also binds the compiled asset to a 3D-body organ: its body_system (which of the 17 systems colours it by burden) and anatomy_model ("male" / "female", from the user’s declared XY/XX basis). This is the compile step for an anatomy organ mesh — the manifest it emits carries geo:bodySystem + geo:anatomyModel so the renderer can look the organ up in the per-system percept table (S5.1) and both colour and sonify it.
compiled_digest
The compiledDigest a q42 asset manifest cites: the container’s whole-file CRC-32C (computed with the header’s own CRC field zeroed, so it equals the sealed header value). Deterministic; changes on any geometry-byte change.
decode_10d_mesh
Read a .10d container back into a dequantized Mesh — the renderer / anatomy path that avoids reparsing the source GLB. Extracts the first QuantizedMesh section.
decode_10d_mesh_frames
Decode supported normal/tangent field data from the optional mesh FieldSidecar.
decode_10d_nodes
Read Tensor10D nodes from a sealed .10d (first Tensor10DNodes section).
decode_10d_normals
Read an optional vertex-aligned normal sidecar from a .10d container. Missing sidecars return Ok(None) so existing mesh-only assets retain their established generated-normal path.
decode_10d_tangents
Read an optional vertex-aligned tangent frame stream from a .10d container.
decode_10d_texture_coordinates_into
Read an optional vertex-aligned UV0 stream into caller-owned storage.