Add support of group tag('g')

This commit is contained in:
Syoyo Fujita
2013-04-25 17:01:52 +09:00
parent 07a52129a5
commit 6556411006
4 changed files with 102 additions and 12 deletions

31
cube.obj Normal file
View File

@@ -0,0 +1,31 @@
mtllib cube.mtl
v 0.000000 2.000000 2.000000
v 0.000000 0.000000 2.000000
v 2.000000 0.000000 2.000000
v 2.000000 2.000000 2.000000
v 0.000000 2.000000 0.000000
v 0.000000 0.000000 0.000000
v 2.000000 0.000000 0.000000
v 2.000000 2.000000 0.000000
# 8 vertices
g front cube
usemtl white
f 1 2 3 4
g back cube
# expects white material
f 8 7 6 5
g right cube
usemtl red
f 4 3 7 8
g top cube
usemtl white
f 5 1 4 8
g left cube
usemtl green
f 5 6 2 1
g bottom cube
usemtl white
f 2 6 7 3
# 6 elements