mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-06-04 11:25:44 +08:00
Update Sequential spec to 2.2 (#228)
This commit is contained in:
parent
0f12e905ba
commit
90aa1eaf89
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user