From 9dcf83fabdcfd13ad7b1976d46439a33784dcb33 Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Wed, 1 Aug 2018 23:27:04 +0200 Subject: [PATCH] Add unit test for glTF primitive mode --- .../models/glTF2/glTF-Asset-Generator/LICENSE | 21 +++++ .../Mesh_PrimitiveMode_00.bin | Bin 0 -> 12288 bytes .../Mesh_PrimitiveMode_00.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_01.bin | Bin 0 -> 96 bytes .../Mesh_PrimitiveMode_01.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_02.bin | Bin 0 -> 48 bytes .../Mesh_PrimitiveMode_02.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_03.bin | Bin 0 -> 60 bytes .../Mesh_PrimitiveMode_03.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_04.bin | Bin 0 -> 48 bytes .../Mesh_PrimitiveMode_04.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_05.bin | Bin 0 -> 48 bytes .../Mesh_PrimitiveMode_05.gltf | 63 ++++++++++++++ .../Mesh_PrimitiveMode_06.bin | Bin 0 -> 72 bytes .../Mesh_PrimitiveMode_06.gltf | 62 ++++++++++++++ .../Mesh_PrimitiveMode_07.bin | Bin 0 -> 16384 bytes .../Mesh_PrimitiveMode_07.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_08.bin | Bin 0 -> 80 bytes .../Mesh_PrimitiveMode_08.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_09.bin | Bin 0 -> 64 bytes .../Mesh_PrimitiveMode_09.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_10.bin | Bin 0 -> 68 bytes .../Mesh_PrimitiveMode_10.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_11.bin | Bin 0 -> 64 bytes .../Mesh_PrimitiveMode_11.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_12.bin | Bin 0 -> 64 bytes .../Mesh_PrimitiveMode_12.gltf | 77 ++++++++++++++++++ .../Mesh_PrimitiveMode_13.bin | Bin 0 -> 72 bytes .../Mesh_PrimitiveMode_13.gltf | 76 +++++++++++++++++ .../Mesh_PrimitiveMode_14.bin | Bin 0 -> 54 bytes .../Mesh_PrimitiveMode_14.gltf | 76 +++++++++++++++++ .../Mesh_PrimitiveMode_15.bin | Bin 0 -> 60 bytes .../Mesh_PrimitiveMode_15.gltf | 76 +++++++++++++++++ .../Mesh_PrimitiveMode/README.md | 33 ++++++++ test/unit/utglTF2ImportExport.cpp | 45 ++++++++++ 35 files changed, 1229 insertions(+) create mode 100644 test/models/glTF2/glTF-Asset-Generator/LICENSE create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_00.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_00.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_01.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_01.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_02.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_02.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_03.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_03.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.bin create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.gltf create mode 100644 test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/README.md diff --git a/test/models/glTF2/glTF-Asset-Generator/LICENSE b/test/models/glTF2/glTF-Asset-Generator/LICENSE new file mode 100644 index 000000000..7b7a04a5c --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Gary Hsu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_00.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_Prim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fi}#jTz_1jPqtb7=~t?XY;aeHjhTHnQ^_$m~+fKgPgh3^_eSvz>INX z#{6vF85GT(Zo*vgQ)Y}$GoEGUok7Xm=@!iu@6EU`%y{mbcLr5+r&}{u{9QBdM>Ez) z<{d%MsOLEyK4tE3Pn$6hn9IJ#yd$VJr^9E=9qw5(<{xv}*O_+&_2zW=yt%`@V8*;> zF8c=ajv!@DhoQN{y=caKYp(c=8Dqno4qrBRxL3@W=gk%0Y{qlJjOT^9!@X)QM6a1E zzSWH9kr~e^bBA;0LiD=1;=9av4w^Am%^mJdb0K=mT=6|-+=FI3m(6%yo6Ek}+~NAn rcd~7$6WTq<_6FbIIeVB#PeEDiu&Xao5G literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.gltf new file mode 100644 index 000000000..917f0a920 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_04.gltf @@ -0,0 +1,63 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_04.bin", + "byteLength": 48 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "mode": 5 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.bin new file mode 100644 index 0000000000000000000000000000000000000000..c16679daa320863633e50a3427e300dcf35522c3 GIT binary patch literal 48 dcmZQzV6bOkVAv1DAOK>6FbIIekl7$U0{~ZO1Ni^| literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.gltf new file mode 100644 index 000000000..b4f6546e6 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_05.gltf @@ -0,0 +1,63 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_05.bin", + "byteLength": 48 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "mode": 6 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.bin new file mode 100644 index 0000000000000000000000000000000000000000..867693d15211913f35cd133cfc6b3bacdab85d04 GIT binary patch literal 72 ccmZQzVA#(9!9a?^9*qs+g8;f3WN|PX0Pc(h^#A|> literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.gltf new file mode 100644 index 000000000..42bd31924 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_06.gltf @@ -0,0 +1,62 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_06.bin", + "byteLength": 72 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 72, + "name": "Positions" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + } + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.bin new file mode 100644 index 0000000000000000000000000000000000000000..cfc7d5d3e819ddcdab2ece975e6cde55e50a521a GIT binary patch literal 16384 zcmYk?4}4YgAII@qLdee$iZCQ0O!p$J8bTO`P=q08Ll{B`lVp-ilHExr$t0O1Q)?#4 zf-%s!Rcs%ube0@LrbMLw5o)fWH?ETm_{IRuqdvB56EZr)- zNqVF72I&^*_0sF4*Ge}_uaRCYy-K=CdZqLV>E+Um(#xcmN-vRakgk^wr58)rN-vUL zD7`?sM!H(MN_wtzrSu%>+0wJ5E2L*i&yb!jT`oOMdaCpk=`!ib(vzf1rAwqIN>7j; zFI_A>PI|2L80jME(bA)&M@kn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WfM+og&!GfKl;U|z!V8#;7g2_n zFaHPi(?pXvN>yjDN5N|6(it!~X%#8KSBH literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf new file mode 100644 index 000000000..800742242 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_07.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 1024, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 1024, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_07.bin", + "byteLength": 16384 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 12288, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 12288, + "byteLength": 4096, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 0 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.bin new file mode 100644 index 0000000000000000000000000000000000000000..77d730d6afd1c321f9939377e7f5d8c3ce516ef5 GIT binary patch literal 80 ucmZQzV6bOkVAv1DAONC~*&sO(u%9(^rX7UIz`zV-fG`sjGXiN41_1yye+AG0 literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.gltf new file mode 100644 index 000000000..2a951b143 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_08.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 8, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_08.bin", + "byteLength": 80 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 32, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 1 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.bin new file mode 100644 index 0000000000000000000000000000000000000000..b828a7af2a9306bbe91fefec2e1d6481ebd095f0 GIT binary patch literal 64 qcmZQzV6bOkVAv1DAONC~*&sO(u%9(^rX7UIz`zV-Faa?m5CZ_%a0SW$ literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf new file mode 100644 index 000000000..12cec564b --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 4, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_09.bin", + "byteLength": 64 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 16, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 2 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.bin new file mode 100644 index 0000000000000000000000000000000000000000..eb4e3f822f789101dff5379a42f8ec4fb1ab428d GIT binary patch literal 68 qcmZQzV6bOkVAv1DAONC~*&sO(u%9(^rX7UIz`zV-Faa?mQ~&_)m<7rJ literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf new file mode 100644 index 000000000..1ca4afbaa --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 5, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_10.bin", + "byteLength": 68 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 20, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 3 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.bin new file mode 100644 index 0000000000000000000000000000000000000000..cf641b2e8ad340b45372084817e97f4c2a7a310b GIT binary patch literal 64 lcmZQzV6bOkVAv1DAONC~*&sO(0MRfu12d4r2*gZ43;?ez1OEU3 literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf new file mode 100644 index 000000000..43c87dab0 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 4, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_11.bin", + "byteLength": 64 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 16, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 5 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.bin new file mode 100644 index 0000000000000000000000000000000000000000..f0a45dc1e073d3206f7f7af11d01aac9da02e3a5 GIT binary patch literal 64 lcmZQzV6bOkVAv1DAONC~*&sO(0MRfu12d4r1jLL$3;?e%1OEU3 literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf new file mode 100644 index 000000000..3e8ca5095 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf @@ -0,0 +1,77 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 4, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_12.bin", + "byteLength": 64 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 16, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 6 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.bin new file mode 100644 index 0000000000000000000000000000000000000000..c3bea4f9c48633a564741f69dcc191eedcbd0e7b GIT binary patch literal 72 pcmZQzV6bOkVAv1DAONC~*&sO(0MTGJBbdv;zzn28Y!J-^!~oAU1Oos7 literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.gltf new file mode 100644 index 000000000..4408895b6 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_13.gltf @@ -0,0 +1,76 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5125, + "count": 6, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_13.bin", + "byteLength": 72 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 24, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.bin new file mode 100644 index 0000000000000000000000000000000000000000..e25c8cdab353dd61c26273ccd9184b1485d7567a GIT binary patch literal 54 icmZQzV6bOkVAv1DAONC~*&sO(0MTGJBLg!dGZO%ZTLc3D literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.gltf new file mode 100644 index 000000000..7994e6413 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_14.gltf @@ -0,0 +1,76 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5121, + "count": 6, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_14.bin", + "byteLength": 54 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 6, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.bin b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.bin new file mode 100644 index 0000000000000000000000000000000000000000..9968347aaae143d4499fc2f6c50cda3d2190bac7 GIT binary patch literal 60 lcmZQzV6bOkVAv1DAONC~*&sO(0MTGJBap$&zzD=l3;>@_1Oos7 literal 0 HcmV?d00001 diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.gltf b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.gltf new file mode 100644 index 000000000..ff2df27d5 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_15.gltf @@ -0,0 +1,76 @@ +{ + "accessors": [ + { + "bufferView": 0, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [ + 0.5, + 0.5, + 0.0 + ], + "min": [ + -0.5, + -0.5, + 0.0 + ], + "name": "Positions Accessor" + }, + { + "bufferView": 1, + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "name": "Indices Accessor" + } + ], + "asset": { + "generator": "glTF Asset Generator", + "version": "2.0" + }, + "buffers": [ + { + "uri": "Mesh_PrimitiveMode_15.bin", + "byteLength": 60 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 48, + "name": "Positions" + }, + { + "buffer": 0, + "byteOffset": 48, + "byteLength": 12, + "name": "Indices" + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1 + } + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} \ No newline at end of file diff --git a/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/README.md b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/README.md new file mode 100644 index 000000000..0e4707e06 --- /dev/null +++ b/test/models/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/README.md @@ -0,0 +1,33 @@ +These models are intended to test indices, vertexes without indices, and using mode to render different primitive types. + +All values of Byte, Short, and Int are unsigned. + +All model indices relate to vertices as shown by the Indices figure below, except for models using Points Mode: + +| Indices | Indices (For Points Mode) | +| :---: | :---: | +| | | + +
+ +The following table shows the properties that are set for a given model. + +| | Sample Image | Mode | Indices Values | Indices Component Type | +| :---: | :---: | :---: | :---: | :---: | +| [00](Mesh_PrimitiveMode_00.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=0) | [](Figures/SampleImages/Mesh_PrimitiveMode_00.png) | Points | | | +| [01](Mesh_PrimitiveMode_01.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=1) | [](Figures/SampleImages/Mesh_PrimitiveMode_01.png) | Lines | | | +| [02](Mesh_PrimitiveMode_02.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=2) | [](Figures/SampleImages/Mesh_PrimitiveMode_02.png) | Line Loop | | | +| [03](Mesh_PrimitiveMode_03.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=3) | [](Figures/SampleImages/Mesh_PrimitiveMode_03.png) | Line Strip | | | +| [04](Mesh_PrimitiveMode_04.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=4) | [](Figures/SampleImages/Mesh_PrimitiveMode_04.png) | Triangle Strip | | | +| [05](Mesh_PrimitiveMode_05.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=5) | [](Figures/SampleImages/Mesh_PrimitiveMode_05.png) | Triangle Fan | | | +| [06](Mesh_PrimitiveMode_06.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=6) | [](Figures/SampleImages/Mesh_PrimitiveMode_06.png) | Triangles | | | +| [07](Mesh_PrimitiveMode_07.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=7) | [](Figures/SampleImages/Mesh_PrimitiveMode_07.png) | Points | [0 - 1023] | Int | +| [08](Mesh_PrimitiveMode_08.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=8) | [](Figures/SampleImages/Mesh_PrimitiveMode_08.png) | Lines | [0, 3, 3, 2, 2, 1, 1, 0] | Int | +| [09](Mesh_PrimitiveMode_09.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=9) | [](Figures/SampleImages/Mesh_PrimitiveMode_09.png) | Line Loop | [0, 3, 2, 1] | Int | +| [10](Mesh_PrimitiveMode_10.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=10) | [](Figures/SampleImages/Mesh_PrimitiveMode_10.png) | Line Strip | [0, 3, 2, 1, 0] | Int | +| [11](Mesh_PrimitiveMode_11.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=11) | [](Figures/SampleImages/Mesh_PrimitiveMode_11.png) | Triangle Strip | [0, 3, 1, 2] | Int | +| [12](Mesh_PrimitiveMode_12.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=12) | [](Figures/SampleImages/Mesh_PrimitiveMode_12.png) | Triangle Fan | [0, 3, 2, 1] | Int | +| [13](Mesh_PrimitiveMode_13.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=13) | [](Figures/SampleImages/Mesh_PrimitiveMode_13.png) | Triangles | [1, 0, 3, 1, 3, 2] | Int | +| [14](Mesh_PrimitiveMode_14.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=14) | [](Figures/SampleImages/Mesh_PrimitiveMode_14.png) | Triangles | [1, 0, 3, 1, 3, 2] | Byte | +| [15](Mesh_PrimitiveMode_15.gltf)
[View](https://bghgary.github.io/glTF-Assets-Viewer/?folder=12&model=15) | [](Figures/SampleImages/Mesh_PrimitiveMode_15.png) | Triangles | [1, 0, 3, 1, 3, 2] | Short | + diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 5117a56fc..a8866f86c 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include using namespace Assimp; @@ -100,6 +101,50 @@ TEST_F( utglTF2ImportExport, importBinaryglTF2FromFileTest ) { EXPECT_TRUE( binaryImporterTest() ); } +TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesFan) { + Assimp::Importer importer; + //Triangles fan + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_12.gltf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); + EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4); + EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 2); + std::array f1 = { 0, 3, 2 }; + EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 3); + for (int i = 0; i < 3; ++i) + { + EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mIndices[i], f1[i]); + } + + std::array f2 = { 0, 2, 1 }; + EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mNumIndices, 3); + for (int i = 0; i < 3; ++i) + { + EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mIndices[i], f2[i]); + } +} + +TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesStrip) { + Assimp::Importer importer; + //Triangles strip + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_11.gltf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); + EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 2); + EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4); + std::array f1 = { 0, 3, 1 }; + EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 3); + for (int i = 0; i < 3; ++i) + { + EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mIndices[i], f1[i]); + } + + std::array f2 = { 1, 3, 2 }; + EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mNumIndices, 3); + for (int i = 0; i < 3; ++i) + { + EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mIndices[i], f2[i]); + } +} + #ifndef ASSIMP_BUILD_NO_EXPORT TEST_F( utglTF2ImportExport, exportglTF2FromFileTest ) { EXPECT_TRUE( exporterTest() );