mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-10-10 02:56:32 +08:00
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
<h2 id="draco-decoder">Draco Decoder</h2>
|
|
|
|
<h3 id="decode">Decode()</h3>
|
|
|
|
<div class="draco-syntax highlighter-rouge"><pre class="highlight"><code>Decode() {
|
|
DecodeHeader()
|
|
DecodeConnectivityData()
|
|
DecodeAttributeData()}
|
|
</code></pre>
|
|
</div>
|
|
|
|
<h3 id="decodeheader">DecodeHeader()</h3>
|
|
|
|
<div class="draco-syntax highlighter-rouge"><pre class="highlight"><code>DecodeHeader() {
|
|
draco_string UI8[5]
|
|
major_version UI8
|
|
minor_version UI8
|
|
encoder_type UI8
|
|
encoder_method UI8
|
|
flags
|
|
}
|
|
</code></pre>
|
|
</div>
|
|
|
|
<h3 id="decodeattributedata">DecodeAttributeData()</h3>
|
|
|
|
<div class="draco-syntax highlighter-rouge"><pre class="highlight"><code>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()
|
|
</code></pre>
|
|
</div>
|