mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-04-23 06:09:57 +08:00
31 lines
818 B
Markdown
31 lines
818 B
Markdown
## Draco Decoder
|
|
|
|
### Decode()
|
|
|
|
~~~~~
|
|
void Decode() {
|
|
ParseHeader();
|
|
if (flags & METADATA_FLAG_MASK)
|
|
DecodeMetadata();
|
|
DecodeConnectivityData();
|
|
DecodeAttributeData();
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax}
|
|
|
|
|
|
### ParseHeader()
|
|
|
|
~~~~~
|
|
ParseHeader() {
|
|
draco_string UI8[5]
|
|
major_version UI8
|
|
minor_version UI8
|
|
encoder_type UI8
|
|
encoder_method UI8
|
|
flags UI16
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax}
|
|
|