From 12bc4761c7804a557647869b63ea0eef468d0183 Mon Sep 17 00:00:00 2001 From: Frank Galligan Date: Fri, 13 Oct 2017 16:00:55 -0700 Subject: [PATCH] Spec: Add GetNumComponents function - This addresses a comment in KhronosGroup/glTF#1114 --- docs/spec/edgebreaker.decoder.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/spec/edgebreaker.decoder.md b/docs/spec/edgebreaker.decoder.md index 59a3d72..ed4c223 100644 --- a/docs/spec/edgebreaker.decoder.md +++ b/docs/spec/edgebreaker.decoder.md @@ -46,6 +46,22 @@ void DecodeEdgebreakerConnectivityData() { ~~~~~ {:.draco-syntax } +### GetNumComponents() + +~~~~~ +int GetNumComponents() { + decoder_type = seq_att_dec_decoder_type[curr_att_dec][curr_att]; + if (decoder_type == SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS) { + prediction_scheme = seq_att_dec_prediction_scheme[curr_att_dec][curr_att]; + if (prediction_scheme == PREDICTION_DIFFERENCE) { + return 2; + } + } + return att_dec_num_components[curr_att_dec][curr_att]; +} +~~~~~ +{:.draco-syntax } + ### ProcessSplitData()