mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-10-13 04:51:32 +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
47 lines
1.3 KiB
Markdown
47 lines
1.3 KiB
Markdown
|
|
## Edgebreaker Traversal Decoder
|
|
|
|
### EdgebreakerTraversal_Start()
|
|
|
|
~~~~~
|
|
EdgebreakerTraversal_Start() {
|
|
size UI64
|
|
symbol_buffer_ size * UI8
|
|
size UI64
|
|
start_face_buffer_ size * UI8
|
|
if (num_attribute_data > 0) {
|
|
attribute_connectivity_decoders_ =
|
|
new BinaryDecoder[num_attribute_data]
|
|
for (i = 0; i < num_attribute_data; ++i) {
|
|
attribute_connectivity_decoders_[i].StartDecoding()
|
|
// RansBitDecoder_StartDecoding
|
|
}
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax }
|
|
|
|
|
|
### Traversal_DecodeSymbol()
|
|
|
|
~~~~~
|
|
Traversal_DecodeSymbol() {
|
|
symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol); bits1
|
|
if (symbol != TOPOLOGY_C) {
|
|
symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix); bits2
|
|
symbol |= (symbol_suffix << 1);
|
|
}
|
|
return symbol
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax }
|
|
|
|
|
|
### DecodeAttributeSeam()
|
|
|
|
~~~~~
|
|
DecodeAttributeSeam(int attribute) {
|
|
return attribute_connectivity_decoders_[attribute].DecodeNextBit();
|
|
}
|
|
~~~~~
|
|
{:.draco-syntax }
|