Skip to main content

Module role

Module role 

Source
Expand description

The role chunk (SPEC.md, section 11): which leaves are not models, but supports or a raft.

Each entry names a leaf, and no two name the same one. Reserved roles are carried as they are: a program treats them as absent, so their leaves are models to it. How roles agree with the supports and hollows chunks is checked where the whole file is read and written.

entries   u32 count, then per entry:
          u32 the leaf's node index in the scene chunk
          u8  the role: 1 supports, 2 a raft

Structs§

RoleEntry
The role of one leaf that is not a model.

Enums§

DecodeRolesError
Why a role payload could not be decoded.
EncodeRolesError
Why a list of roles could not be encoded.

Constants§

ROLE_RAFT
The role of a leaf that shows a raft.
ROLE_SUPPORTS
The role of a leaf that shows supports.
ROLE_TAG
The tag of the role chunk.
ROLE_VERSION
The role payload layout this build writes and reads.

Functions§

decode_roles
Decodes a role payload, checking it against scene, the scene of the same file.
encode_roles
Encodes entries as a role payload, in their order, checking them against scene.