mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-10-12 05:01:33 +08:00

* Create template for spec pages * Adapt syntax-table styles to Bootstrap * Reposition type/size annotations at col 86 (and update README.md) * Let Bootstrap style breadcrumb trails * Unrelated: abstract footer to an _include
50 lines
1.2 KiB
Markdown
50 lines
1.2 KiB
Markdown
## Draco Decoder
|
|
|
|
### Decode()
|
|
|
|
~~~~~
|
|
Decode() {
|
|
DecodeHeader()
|
|
if (flags & METADATA_FLAG_MASK)
|
|
DecodeGeometryMetadata(metadata)
|
|
DecodeConnectivityData()
|
|
DecodeAttributeData()
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax}
|
|
|
|
|
|
### DecodeHeader()
|
|
|
|
~~~~~
|
|
DecodeHeader() {
|
|
draco_string UI8[5]
|
|
major_version UI8
|
|
minor_version UI8
|
|
encoder_type UI8
|
|
encoder_method UI8
|
|
flags
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax}
|
|
|
|
|
|
### DecodeAttributeData()
|
|
|
|
~~~~~
|
|
DecodeAttributeData() {
|
|
num_attributes_decoders UI8
|
|
for (i = 0; i < num_attributes_decoders; ++i) {
|
|
CreateAttributesDecoder(i);
|
|
}
|
|
for (auto &att_dec : attributes_decoders_) {
|
|
att_dec->Initialize(this, point_cloud_)
|
|
}
|
|
for (i = 0; i < num_attributes_decoders; ++i) {
|
|
attributes_decoders_[i]->DecodeAttributesDecoderData(buffer_)
|
|
}
|
|
DecodeAllAttributes()
|
|
OnAttributesDecoded()
|
|
~~~~~
|
|
{:.draco-syntax}
|