1pub mod axis_role;
21pub mod conformance;
22pub mod crc32c;
23pub mod field_section;
24pub mod header;
25pub mod integrity;
26pub mod manifold_identity_container;
28pub mod material_container;
29pub mod material_section;
30mod material_section_codec;
31pub use manifold_identity_container::{
32 decode_container_manifold_identity, encode_container_with_manifold_identity,
33 encode_container_with_manifold_identity_extensions, ManifoldContainerError,
34};
35pub mod manifold_identity_v2;
37pub mod mesh_section;
38pub mod metric_check;
39pub mod corpus_envelope;
40pub mod metric_trait_gate;
41pub mod morph_section;
42pub mod node_section;
43pub mod normal_section;
44pub mod provenance_section;
45pub mod section;
46pub mod skeletal_container;
47pub mod skeletal_section;
49pub mod surface_reading;
50pub mod texture_coordinate_container;
51pub mod texture_coordinate_section;
52pub mod typed_payloads;
54pub mod cluster_dag_section;
65pub mod correspondence_section;
66pub mod entity_ontology_section;
67pub mod impostor_section;
68pub mod procedural_synthesis;
69pub mod spatial_index_section;
70pub mod surfel_section;
71pub mod topology_section;
72pub mod voxel_section;
73
74pub use cluster_dag_section::{
75 cluster_dag_encoded_len, decode_cluster_dag_section, decode_oct16_normal,
76 encode_cluster_dag_section, encode_oct16_normal, project_sphere_error_px,
77 select_cut_clusters_zero_heap, ClusterDagMiniHeader, ClusterDagSectionError,
78 MeshletClusterNode, CLUSTER_DAG_HEADER_SIZE, CLUSTER_DAG_SECTION_VERSION,
79 FLAG_CDAG_CONE_CULLED, FLAG_CDAG_SEAM_LOCKED, MAGIC_CDAG, MAX_CLUSTER_DAG_NODES,
80 MAX_MESHLET_TRIANGLES, MAX_MESHLET_VERTICES, MESHLET_CLUSTER_NODE_SIZE,
81};
82pub use correspondence_section::{
83 correspondence_encoded_len, decode_correspondence_section, deform_surface_vertices_zero_heap,
84 encode_correspondence_section, CorrespondenceMiniHeader, CorrespondenceSectionError,
85 VertexTetBinding, BARYCENTRIC_UNORM16_SUM, CORRESPONDENCE_HEADER_SIZE,
86 CORRESPONDENCE_SECTION_VERSION, FLAG_FEMC_CONFORMING_BARYCENTRIC,
87 FLAG_FEMC_HAS_NORMAL_ROTATION, MAGIC_FEMC, MAX_CORRESPONDENCE_BINDINGS,
88 VERTEX_TET_BINDING_SIZE,
89};
90pub use voxel_section::*;
91
92pub use axis_role::{
93 AxisRole, AXIS_ORDER, COORDINATE_AXES, MU_AXIS, PROPOSED_AXIS_ROLES, SELECTOR_AXES,
94};
95pub use crc32c::{crc32c, crc32c_update};
96pub use entity_ontology_section::{
97 decode_entity_ontology_section_into, decode_personal_ontology_section_into,
98 encode_entity_ontology_section, encode_personal_ontology_section, entity_ontology_encoded_len,
99 personal_ontology_encoded_len, AffordanceBinaryRecord, EntityOntologyMiniHeader,
100 EntityOntologySectionError, PersonalOntologyMiniHeader, PersonalOntologySectionError,
101 AFFORDANCE_RECORD_SIZE, ENTITY_ONTOLOGY_MINI_HEADER_SIZE, ENTITY_ONTOLOGY_SECTION_VERSION,
102 MAGIC_EONT, MAGIC_PONT, MAX_AFFORDANCES_PER_SECTION, PERSONAL_ONTOLOGY_MINI_HEADER_SIZE,
103 PERSONAL_ONTOLOGY_SECTION_VERSION,
104};
105pub use header::{
106 Container10dHeader, HeaderParseError, FLAG_DEFAULT_DISPOSITION_REFUSE, HEADER_BYTE_SIZE,
107 HEADER_VERSION, LEGACY_HEADER_VERSION, MAGIC_10D, MAX_SECTION_COUNT, SUPPORTED_HEADER_VERSIONS,
108};
109pub use impostor_section::{
110 decode_impostor_section, encode_impostor_section, hemi_octahedral_decode,
111 hemi_octahedral_encode, sample_impostor_blend_weights, ImpostorAtlasMiniHeader,
112 ImpostorBlendSample, ImpostorSectionError, FLAG_DEPTH_IN_ALPHA, FLAG_HEMI_OCTAHEDRAL,
113 FLAG_OCT32_NORMALS, FLAG_PBR_METALLIC_ROUGHNESS, IMPOSTOR_MINI_HEADER_SIZE,
114 IMPOSTOR_SECTION_VERSION, MAGIC_IMPO,
115};
116pub use integrity::{
117 compute_whole_file_crc32c, seal_whole_file_crc32c, verify_whole_file_crc32c, IntegrityError,
118};
119pub use manifold_identity_v2::{
120 decode_manifold_identity_v2, encode_manifold_identity_v2,
121 encode_manifold_identity_v2_with_extensions, encoded_len as manifold_identity_v2_encoded_len,
122 IntegrityIndexDigest, ManifestV2Error, ManifoldIdentityV2, StableEntityId, TypedFieldRecord,
123 BUILTIN_FIELD_KINDS, FIELD_KIND_ELECTROMAGNETIC, FIELD_KIND_SCALAR, FIELD_KIND_SPECTRAL,
124 FIELD_KIND_TENSOR, FIELD_KIND_VECTOR, FIELD_KIND_SURFACE_FRAMES, FIELD_KIND_MORPH_TARGETS,
125 MANIFOLD_IDENTITY_V2_AXIS_ORDER,
126 MANIFOLD_IDENTITY_V2_FIELD_RECORD_SIZE, MANIFOLD_IDENTITY_V2_HEADER_SIZE,
127 MANIFOLD_IDENTITY_V2_MAGIC, MANIFOLD_IDENTITY_V2_MAX_BYTES, MANIFOLD_IDENTITY_V2_MAX_FIELDS,
128 MANIFOLD_IDENTITY_V2_VERSION,
129};
130pub use material_container::{
131 attach_material_section, material_container_counts, read_material_section_into,
132 MaterialContainerError,
133};
134pub use material_section::{
135 decode_material_section_into, encode_material_section,
136 encoded_len as material_section_encoded_len, material_section_counts,
137 validate_material_bindings, MaterialRecord, MaterialSectionError, OpacityMode, ShadingModel,
138 SubmeshRange, TextureAddressMode, TextureFilterMode, TextureMinFilter, TextureSampler,
139 TextureTransform, MATERIAL_RECORD_SIZE, MATERIAL_SECTION_HEADER_SIZE, MATERIAL_SECTION_VERSION,
140 MATERIAL_V1_RECORD_SIZE, MAX_MATERIALS, MAX_SUBMESH_RANGES, SUBMESH_RANGE_SIZE,
141 TEXTURE_SAMPLER_RECORD_SIZE,
142};
143pub use mesh_section::{
144 decode_mesh_section, encode_mesh_section, parse_mesh_header, MeshMiniHeader, MeshSectionError,
145 FLAG_U16_INDICES, MAX_TRIANGLE_COUNT, MAX_VERTEX_COUNT, MESH_MINI_HEADER_SIZE,
146};
147pub use morph_section::{
148 apply_morph_targets_zero_heap, decode_morph_section_into, dequantize_morph_delta,
149 encode_morph_section, morph_section_encoded_len, quantize_morph_delta, MorphSectionError,
150 MorphSectionHeader, QuantizedMorphDelta, FLAG_MORPH_DENSE, FLAG_MORPH_HAS_NORMALS,
151 FLAG_MORPH_HAS_TANGENTS, FLAG_MORPH_ONTOGENETIC_BIND, FLAG_MORPH_SPARSE, MAGIC_MRP1,
152 MAX_MORPH_DELTAS, MAX_MORPH_TARGETS, MORPH_SECTION_HEADER_SIZE, MORPH_SECTION_VERSION,
153 QUANTIZED_MORPH_DELTA_SIZE,
154};
155pub use metric_check::{
156 proposed_metric_descriptor, verify_descriptor_against_reality, MetricBranchDescriptor,
157 MetricCompletenessDescriptor, MetricDivergence, MetricKind, BOUNDARY_CLIQUE_BRANCH_INDEX,
158 METRIC_BRANCH_COUNT,
159};
160pub use corpus_envelope::{
161 cited_envelope_from_corpus, reference_envelope_for_species, BoundBasis, BoundCitation,
162 CitedMetricEnvelope, P_BODY_HEIGHT, P_BODY_LENGTH, P_BODY_MASS, P_BODY_WIDTH, UNIT_KILOGRAM,
163 UNIT_METRE,
164};
165pub use metric_trait_gate::{
166 measure_aabb_extents_zero_heap, verify_fauna_vs_vehicle_scale_invariant_zero_heap,
167 verify_metric_trait_bounds_zero_heap, MetricTraitEnvelope, MetricTraitGateViolation,
168 ENVELOPE_AQUILA_AUDAX, ENVELOPE_CORYMBIA_APARRERINJA, ENVELOPE_FIELD_UTILITY_4WD,
169 ENVELOPE_MACROPUS_GIGANTEUS, ENVELOPE_ORNITHORHYNCHUS_ANATINUS, ENVELOPE_VOMBATUS_URSINUS,
170};
171pub use node_section::{
172 parse_node_header, read_node, read_node_aos, read_node_soa, read_node_soa_lane,
173 transpose_aos_to_soa, transpose_soa_to_aos, write_node_q_at, write_node_section_aos,
174 write_node_section_soa, NodeMiniHeader, NodeSectionError, AXIS_COUNT, LAYOUT_AOS, LAYOUT_SOA,
175 MAX_NODE_COUNT, NODE_MINI_HEADER_SIZE, TENSOR10D_SIZE,
176};
177pub use normal_section::{
178 decode_mesh_frames, decode_mesh_frames_into, decode_mesh_frames_with_limits,
179 inspect_mesh_frames, MeshFrameDecodeLimits, MeshFrameLayout,
180 decode_normals, decode_tangents, encode_mesh_frames, encode_normals,
181 frame_encoded_len, is_normal_section, MeshFrameStreams, NormalSectionError, MAX_NORMAL_COUNT,
182 NORMAL_SECTION_HEADER_SIZE, NORMAL_SECTION_VERSION,
183};
184pub use procedural_synthesis::{
185 decode_procedural_synthesis_section, encode_procedural_synthesis_section,
186 evaluate_allometric_dimension, evaluate_log_spiral_2d, evaluate_pga_motor_oscillation,
187 evaluate_smooth_minimum_sdf, evaluate_stress_cleavage_partition, evaluate_voronoi_cellular_f1,
188 ProceduralSynthesisError, ProceduralSynthesisHeader, FLAG_ALLOMETRIC_GROWTH,
189 FLAG_CELLULAR_VORONOI, FLAG_IMPLICIT_FILLET, FLAG_LOG_SPIRAL_ODE, FLAG_PGA_MOTOR_DYNAMICS,
190 FLAG_STRESS_FRACTURE, MAGIC_PROC, PROCEDURAL_SYNTHESIS_HEADER_SIZE,
191 PROCEDURAL_SYNTHESIS_SECTION_VERSION,
192};
193pub use provenance_section::{
194 decode_provenance_section, encode_provenance_section, encoded_len as provenance_encoded_len,
195 validate_provenance, ProvenanceMiniHeader, ProvenanceSectionError, ProvenanceSidecar,
196 ProvenanceSidecarView, FLAG_HAS_VC, PROVENANCE_MAGIC, PROVENANCE_MINI_HEADER_SIZE,
197 PROVENANCE_SECTION_VERSION,
198};
199pub use typed_payloads::{
200 inspect_container_mesh_frames, read_container_mesh_frames,
201 read_container_mesh_frames_into, read_container_mesh_frames_with_limits,
202 read_container_morph_targets_into, TypedPayload,
203 TypedPayloadError, TypedPayloadResolver,
204};
205pub use section::{
206 encode_container, parse_section_table, AlignmentTier, SectionDescriptor, SectionInput,
207 SectionTableError, SectionType, SECTION_DESCRIPTOR_SIZE,
208};
209#[cfg(any(
210 not(target_arch = "wasm32"),
211 feature = "portal",
212 feature = "wasm-logic",
213 feature = "wasm-scientific"
214))]
215pub use spatial_index_section::{
216 decode_spatial_index_section, encode_spatial_index_section, DecodedSpatialIndex,
217 SpatialIndexMiniHeader, SpatialIndexSectionError, SPATIAL_INDEX_MINI_HEADER_SIZE,
218};
219pub use surfel_section::{
220 decode_octahedral_normal, decode_surfel_section, encode_octahedral_normal,
221 encode_surfel_section, generate_surfel_from_cluster, SurfelBinaryRecord, SurfelSectionError,
222 SurfelSectionMiniHeader, FLAG_SURFEL_GAUSSIAN_COVARIANCE, FLAG_SURFEL_HIERARCHICAL, MAGIC_SURF,
223 SURFEL_MINI_HEADER_SIZE, SURFEL_RECORD_SIZE, SURFEL_SECTION_VERSION,
224};
225pub use texture_coordinate_container::{
226 attach_texture_coordinate_section, read_texture_coordinate_section_into,
227 TextureCoordinateContainerError,
228};
229pub use texture_coordinate_section::{
230 decode_texture_coordinates_into, encode_texture_coordinate_section,
231 texture_coordinate_section_count, TextureCoordinateSectionError,
232 TEXTURE_COORDINATE_SECTION_HEADER_SIZE, TEXTURE_COORDINATE_SECTION_VERSION,
233};
234#[cfg(any(
235 not(target_arch = "wasm32"),
236 feature = "portal",
237 feature = "wasm-logic",
238 feature = "wasm-scientific"
239))]
240pub use topology_section::{
241 decode_topology_section, encode_topology_section, TopologyMiniHeader, TopologySectionData,
242 TopologySectionError, TOPOLOGY_MINI_HEADER_SIZE,
243};
244
245pub const CONTAINER_10D_ABI_VERSION: u32 = 1;
249
250pub use section::{
252 copy_opaque_container_into, inspect_opaque_container,
253 replace_known_section_bytes_preserving_layout, OpaqueContainerView,
254 OpaquePreservationBudget, OpaquePreservationError,
255};