From 90aa1eaf8998081a5d22316eb982c83eaf7f917c Mon Sep 17 00:00:00 2001 From: FrankGalligan Date: Wed, 11 Oct 2017 12:20:26 -0700 Subject: [PATCH] Update Sequential spec to 2.2 (#228) --- docs/spec/sequential.decoder.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/spec/sequential.decoder.md b/docs/spec/sequential.decoder.md index 5ba0677..c65a8d0 100644 --- a/docs/spec/sequential.decoder.md +++ b/docs/spec/sequential.decoder.md @@ -5,8 +5,8 @@ ~~~~~ void ParseSequentialConnectivityData() { - num_faces I32 - num_points I32 + num_faces varUI32 + num_points varUI32 connectivity_method UI8 } ~~~~~ @@ -41,6 +41,20 @@ void ParseSequentialIndicesUI16() { {:.draco-syntax } +### ParseSequentialIndicesVarUI32() + +~~~~~ +void ParseSequentialIndicesVarUI32() { + for (i = 0; i < num_faces; ++i) { + for (j = 0; j < 3; ++j) { + face_to_vertex[j][i] varUI32 + } + } +} +~~~~~ +{:.draco-syntax } + + ### ParseSequentialIndicesUI32() ~~~~~ @@ -63,6 +77,8 @@ void DecodeSequentialIndices() { ParseSequentialIndicesUI8(); } else if (num_points < (1 << 16)) { ParseSequentialIndicesUI16(); + } else if (num_points < (1 << 21)) { + ParseSequentialIndicesVarUI32(); } else { ParseSequentialIndicesUI32(); }