Skip to main content

Module morph_section

Module morph_section 

Source
Expand description

.10d Morph Target Section (MRP1) — sparse and dense quantized blend-shape deltas with optional EONT1 ontogenetic/metabolic binding.

Honors AGENTS.md §0 & §0-A:

  • encode_morph_section, decode_morph_section_into, and apply_morph_targets_zero_heap perform zero heap allocations, operating exclusively on caller-provided slices.

Structs§

MorphSectionHeader
32-byte #[repr(C)] POD header for a .10d MRP1 morph target section.
QuantizedMorphDelta
16-byte #[repr(C)] POD quantized morph delta record.

Enums§

MorphSectionError
Errors produced when encoding, decoding, or applying a .10d MRP1 morph section.

Constants§

FLAG_MORPH_DENSE
FLAG_MORPH_HAS_NORMALS
FLAG_MORPH_HAS_TANGENTS
FLAG_MORPH_ONTOGENETIC_BIND
FLAG_MORPH_SPARSE
Section flags for MorphSectionHeader::flags.
MAGIC_MRP1
4-byte magic identifier for .10d morph target sections.
MAX_MORPH_DELTAS
Maximum quantized morph delta records per section.
MAX_MORPH_TARGETS
Maximum morph targets supported per .10d container.
MORPH_SECTION_HEADER_SIZE
Fixed byte size of MorphSectionHeader.
MORPH_SECTION_VERSION
Current version of the MRP1 section format.
QUANTIZED_MORPH_DELTA_SIZE
Fixed byte size of QuantizedMorphDelta.

Functions§

apply_morph_targets_zero_heap
Apply morph target deltas directly into caller-owned vertex buffers (HotZeroHeap).
decode_morph_section_into
Decode a MRP1 morph section into caller-provided QuantizedMorphDelta storage (Zero-Heap).
dequantize_morph_delta
Dequantize a 16-byte QuantizedMorphDelta back into (position_delta, normal_delta).
encode_morph_section
Encode a MRP1 morph target section into a caller-supplied byte slice (Zero-Heap).
morph_section_encoded_len
Compute exact byte length for a MRP1 section with delta_count records.
quantize_morph_delta
Quantize a floating-point position/normal/tangent morph delta into a 16-byte POD record.