digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__magicavoxel_vox {
label="MagicavoxelVox";
graph[style=dotted];
magicavoxel_vox__seq [label=<
pos | size | type | id |
0 | 4 | | magic |
4 | 4 | u4le | version |
8 | ... | Chunk | main |
>];
subgraph cluster__chunk {
label="MagicavoxelVox::Chunk";
graph[style=dotted];
chunk__seq [label=<
pos | size | type | id |
0 | 4 | u4be→ChunkType | chunk_id |
4 | 4 | u4le | num_bytes_of_chunk_content |
8 | 4 | u4le | num_bytes_of_children_chunks |
12 | ... | switch (chunk_id) | chunk_content |
... | ... | Chunk | children_chunks |
repeat to end of stream |
>];
chunk__seq_chunk_content_switch [label=<
case | type |
:chunk_type_size | Size |
:chunk_type_matt | Matt |
:chunk_type_rgba | Rgba |
:chunk_type_xyzi | Xyzi |
:chunk_type_pack | Pack |
>];
}
subgraph cluster__size {
label="MagicavoxelVox::Size";
graph[style=dotted];
size__seq [label=<
pos | size | type | id |
0 | 4 | u4le | size_x |
4 | 4 | u4le | size_y |
8 | 4 | u4le | size_z |
>];
}
subgraph cluster__rgba {
label="MagicavoxelVox::Rgba";
graph[style=dotted];
rgba__seq [label=<
pos | size | type | id |
0 | 4 | Color | colors |
repeat 256 times |
>];
}
subgraph cluster__pack {
label="MagicavoxelVox::Pack";
graph[style=dotted];
pack__seq [label=<
pos | size | type | id |
0 | 4 | u4le | num_models |
>];
}
subgraph cluster__matt {
label="MagicavoxelVox::Matt";
graph[style=dotted];
matt__seq [label=<
pos | size | type | id |
0 | 4 | u4le | id |
4 | 4 | u4le→MaterialType | material_type |
8 | 4 | f4le | material_weight |
12 | 4 | u4le | property_bits |
16 | 4 | f4le | plastic |
20 | 4 | f4le | roughness |
24 | 4 | f4le | specular |
28 | 4 | f4le | ior |
32 | 4 | f4le | attenuation |
36 | 4 | f4le | power |
40 | 4 | f4le | glow |
44 | 4 | f4le | is_total_power |
>];
matt__inst__has_is_total_power [label=<
id | value |
has_is_total_power | (property_bits & 128) != 0 |
>];
matt__inst__has_plastic [label=<
id | value |
has_plastic | (property_bits & 1) != 0 |
>];
matt__inst__has_attenuation [label=<
id | value |
has_attenuation | (property_bits & 16) != 0 |
>];
matt__inst__has_power [label=<
id | value |
has_power | (property_bits & 32) != 0 |
>];
matt__inst__has_roughness [label=<
id | value |
has_roughness | (property_bits & 2) != 0 |
>];
matt__inst__has_specular [label=<
id | value |
has_specular | (property_bits & 4) != 0 |
>];
matt__inst__has_ior [label=<
id | value |
has_ior | (property_bits & 8) != 0 |
>];
matt__inst__has_glow [label=<
id | value |
has_glow | (property_bits & 64) != 0 |
>];
}
subgraph cluster__xyzi {
label="MagicavoxelVox::Xyzi";
graph[style=dotted];
xyzi__seq [label=<
pos | size | type | id |
0 | 4 | u4le | num_voxels |
4 | 4 | Voxel | voxels |
repeat num_voxels times |
>];
}
subgraph cluster__color {
label="MagicavoxelVox::Color";
graph[style=dotted];
color__seq [label=<
pos | size | type | id |
0 | 1 | u1 | r |
1 | 1 | u1 | g |
2 | 1 | u1 | b |
3 | 1 | u1 | a |
>];
}
subgraph cluster__voxel {
label="MagicavoxelVox::Voxel";
graph[style=dotted];
voxel__seq [label=<
pos | size | type | id |
0 | 1 | u1 | x |
1 | 1 | u1 | y |
2 | 1 | u1 | z |
3 | 1 | u1 | color_index |
>];
}
}
magicavoxel_vox__seq:main_type -> chunk__seq [style=bold];
chunk__seq:chunk_content_type -> chunk__seq_chunk_content_switch [style=bold];
chunk__seq_chunk_content_switch:case0 -> size__seq [style=bold];
chunk__seq_chunk_content_switch:case1 -> matt__seq [style=bold];
chunk__seq_chunk_content_switch:case2 -> rgba__seq [style=bold];
chunk__seq_chunk_content_switch:case3 -> xyzi__seq [style=bold];
chunk__seq_chunk_content_switch:case4 -> pack__seq [style=bold];
chunk__seq:chunk_id_type -> chunk__seq:chunk_content_type [color="#404040"];
chunk__seq:children_chunks_type -> chunk__seq [style=bold];
rgba__seq:colors_type -> color__seq [style=bold];
matt__seq:property_bits_type -> matt__inst__has_is_total_power [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_plastic [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_attenuation [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_power [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_roughness [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_specular [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_ior [color="#404040"];
matt__seq:property_bits_type -> matt__inst__has_glow [color="#404040"];
xyzi__seq:voxels_type -> voxel__seq [style=bold];
xyzi__seq:num_voxels_type -> xyzi__seq:voxels__repeat [color="#404040"];
}