From e054f4d95a5ac916b23e0341190badac8e908dc4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 15:58:31 +0000 Subject: Broken down Brush47 --- res/brush47.mtl | 4 +- res/brush47.obj | 191 +++++++++++++++++++++++++++++------------------------- test/test-obj.cpp | 7 +- 3 files changed, 108 insertions(+), 94 deletions(-) diff --git a/res/brush47.mtl b/res/brush47.mtl index 0e3563b..a4ba512 100644 --- a/res/brush47.mtl +++ b/res/brush47.mtl @@ -1,7 +1,7 @@ # Blender MTL File: 'brush47.blend' # Material Count: 1 -newmtl Material.004 +newmtl Brush47 Ns 225.000000 Ka 1.000000 1.000000 1.000000 Kd 0.800000 0.800000 0.800000 @@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000 Ni 1.450000 d 1.000000 illum 2 -map_Kd /home/randomdan/dev/ilt-raw/brush47/brush47.png +map_Kd brush47.png diff --git a/res/brush47.obj b/res/brush47.obj index d60409a..3f23a80 100644 --- a/res/brush47.obj +++ b/res/brush47.obj @@ -1,23 +1,7 @@ # Blender v2.91.0 OBJ File: 'brush47.blend' # www.blender.org mtllib brush47.mtl -o Brush_47_Brush47 -v 1.326000 0.100000 2.700000 -v 1.326000 1.100000 2.700000 -v 1.326000 0.100000 9.300000 -v 1.326000 1.100000 9.300000 -v -1.326000 0.100000 2.700000 -v -1.326000 1.100000 2.700000 -v -1.326000 0.100000 9.300000 -v -1.326000 1.100000 9.300000 -v -1.326000 0.100000 -2.700000 -v -1.326000 0.100000 -9.300000 -v -1.326000 1.100000 -9.300000 -v -1.326000 1.100000 -2.700000 -v 1.326000 0.100000 -2.700000 -v 1.326000 1.100000 -2.700000 -v 1.326000 0.100000 -9.300000 -v 1.326000 1.100000 -9.300000 +o Body v -1.345000 1.200000 -9.690000 v -1.345000 1.200000 9.690000 v 1.345000 1.200000 -9.690000 @@ -50,44 +34,6 @@ v 1.300000 0.200000 -2.250000 v 1.300000 1.200000 -2.250000 v 1.300000 0.200000 2.250000 v 1.300000 1.200000 2.250000 -vt 0.342014 0.435417 -vt 0.006076 0.435417 -vt 0.006076 0.591667 -vt 0.342014 0.591667 -vt 0.987847 0.602083 -vt 0.987847 0.464583 -vt 0.931424 0.464583 -vt 0.931424 0.602083 -vt 0.006076 0.435417 -vt 0.342014 0.435417 -vt 0.342014 0.591667 -vt 0.006076 0.591667 -vt 0.987847 0.602083 -vt 0.987847 0.464583 -vt 0.931424 0.464583 -vt 0.931424 0.602083 -vt 0.043403 0.081250 -vt 0.043403 0.014583 -vt 0.002604 0.014583 -vt 0.002604 0.081250 -vt 0.342014 0.435417 -vt 0.342014 0.591667 -vt 0.006076 0.591667 -vt 0.006076 0.435417 -vt 0.043403 0.014583 -vt 0.002604 0.014583 -vt 0.002604 0.081250 -vt 0.043403 0.081250 -vt 0.342014 0.435417 -vt 0.342014 0.591667 -vt 0.006076 0.591667 -vt 0.006076 0.435417 -vt 0.043403 0.014583 -vt 0.002604 0.014583 -vt 0.002604 0.081250 -vt 0.043403 0.081250 -vt 0.043403 0.081250 -vt 0.043403 0.014583 vt 0.025174 0.662500 vt 0.025174 0.831250 vt 0.037326 0.925000 @@ -154,14 +100,13 @@ vt 0.152778 0.364583 vt 0.197049 0.364583 vt 0.204861 0.310417 vt 0.144965 0.310417 -vn -1.0000 0.0000 -0.0000 -vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 vn 1.0000 0.0000 0.0000 -vn 0.0000 0.0000 1.0000 -vn 0.0000 -1.0000 0.0000 vn 0.0000 1.0000 0.0000 vn -0.0000 -0.2906 -0.9569 vn 0.0000 -0.2906 0.9569 +vn -0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 vn -0.3335 -0.9344 -0.1252 vn 0.3335 -0.9344 -0.1252 vn 0.3335 -0.9344 0.1252 @@ -170,34 +115,104 @@ vn 0.6276 -0.5509 -0.5500 vn 0.6276 -0.5509 0.5500 vn -0.6276 -0.5509 -0.5500 vn -0.6276 -0.5509 0.5500 -usemtl Material.004 +usemtl Brush47 s off -f 1/1/1 3/2/1 4/3/1 2/4/1 -f 3/5/2 7/6/2 8/7/2 4/8/2 -f 7/9/3 5/10/3 6/11/3 8/12/3 -f 5/13/4 1/14/4 2/15/4 6/16/4 -f 8/17/5 6/18/5 2/19/5 4/20/5 -f 10/21/3 11/22/3 12/23/3 9/24/3 -f 9/25/2 12/26/2 14/27/2 13/28/2 -f 13/29/1 14/30/1 16/31/1 15/32/1 -f 15/33/4 16/34/4 11/35/4 10/36/4 -f 14/27/5 12/37/5 11/38/5 16/34/5 -f 20/39/1 30/40/1 28/41/1 26/42/1 31/43/1 19/44/1 -f 17/45/3 32/46/3 22/47/3 24/48/3 29/49/3 18/50/3 -f 18/51/6 20/52/6 19/53/6 17/54/6 -f 29/55/7 24/56/7 28/57/7 30/58/7 -f 31/59/8 26/60/8 22/61/8 32/62/8 -f 18/63/2 29/64/2 30/65/2 20/66/2 -f 19/67/4 31/68/4 32/69/4 17/70/4 -f 33/71/2 34/72/2 36/73/2 35/74/2 -f 37/75/4 38/76/4 40/77/4 39/78/4 -f 41/79/3 42/80/3 44/81/3 43/82/3 -f 43/82/2 44/81/2 48/83/2 47/84/2 -f 47/84/1 48/83/1 46/85/1 45/86/1 -f 45/86/4 46/85/4 42/80/4 41/79/4 +f 4/1/1 14/2/1 12/3/1 10/4/1 15/5/1 3/6/1 +f 1/7/2 16/8/2 6/9/2 8/10/2 13/11/2 2/12/2 +f 2/13/3 4/14/3 3/15/3 1/16/3 +f 13/17/4 8/18/4 12/19/4 14/20/4 +f 15/21/5 10/22/5 6/23/5 16/24/5 +f 2/25/6 13/26/6 14/27/6 4/28/6 +f 3/29/7 15/30/7 16/31/7 1/32/7 +f 17/33/6 18/34/6 20/35/6 19/36/6 +f 21/37/7 22/38/7 24/39/7 23/40/7 +f 25/41/2 26/42/2 28/43/2 27/44/2 +f 27/44/6 28/43/6 32/45/6 31/46/6 +f 31/46/1 32/45/1 30/47/1 29/48/1 +f 29/48/7 30/47/7 26/42/7 25/41/7 s 1 -f 27/87/9 23/88/10 21/89/11 25/90/12 -f 21/91/11 23/92/10 24/48/13 22/93/14 -f 23/94/10 27/95/9 28/96/15 24/97/13 -f 27/98/9 25/99/12 26/42/16 28/100/15 -f 25/101/12 21/102/11 22/103/14 26/104/16 +f 11/49/8 7/50/9 5/51/10 9/52/11 +f 5/53/10 7/54/9 8/10/12 6/55/13 +f 7/56/9 11/57/8 12/58/14 8/59/12 +f 11/60/8 9/61/11 10/4/15 12/62/14 +f 9/63/11 5/64/10 6/65/13 10/66/15 +o Bogey2 +v -1.326000 0.100000 -2.700000 +v -1.326000 0.100000 -9.300000 +v -1.326000 1.100000 -9.300000 +v -1.326000 1.100000 -2.700000 +v 1.326000 0.100000 -2.700000 +v 1.326000 1.100000 -2.700000 +v 1.326000 0.100000 -9.300000 +v 1.326000 1.100000 -9.300000 +vt 0.342014 0.435417 +vt 0.342014 0.591667 +vt 0.006076 0.591667 +vt 0.006076 0.435417 +vt 0.043403 0.014583 +vt 0.002604 0.014583 +vt 0.002604 0.081250 +vt 0.043403 0.081250 +vt 0.342014 0.435417 +vt 0.342014 0.591667 +vt 0.006076 0.591667 +vt 0.006076 0.435417 +vt 0.043403 0.014583 +vt 0.002604 0.014583 +vt 0.002604 0.081250 +vt 0.043403 0.081250 +vt 0.043403 0.081250 +vt 0.043403 0.014583 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +usemtl Brush47 +s off +f 34/67/16 35/68/16 36/69/16 33/70/16 +f 33/71/17 36/72/17 38/73/17 37/74/17 +f 37/75/18 38/76/18 40/77/18 39/78/18 +f 39/79/19 40/80/19 35/81/19 34/82/19 +f 38/73/20 36/83/20 35/84/20 40/80/20 +o Bogey1 +v 1.326000 0.100000 2.700000 +v 1.326000 1.100000 2.700000 +v 1.326000 0.100000 9.300000 +v 1.326000 1.100000 9.300000 +v -1.326000 0.100000 2.700000 +v -1.326000 1.100000 2.700000 +v -1.326000 0.100000 9.300000 +v -1.326000 1.100000 9.300000 +vt 0.342014 0.435417 +vt 0.006076 0.435417 +vt 0.006076 0.591667 +vt 0.342014 0.591667 +vt 0.987847 0.602083 +vt 0.987847 0.464583 +vt 0.931424 0.464583 +vt 0.931424 0.602083 +vt 0.006076 0.435417 +vt 0.342014 0.435417 +vt 0.342014 0.591667 +vt 0.006076 0.591667 +vt 0.987847 0.602083 +vt 0.987847 0.464583 +vt 0.931424 0.464583 +vt 0.931424 0.602083 +vt 0.043403 0.081250 +vt 0.043403 0.014583 +vt 0.002604 0.014583 +vt 0.002604 0.081250 +vn -1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +usemtl Brush47 +s off +f 41/85/21 43/86/21 44/87/21 42/88/21 +f 43/89/22 47/90/22 48/91/22 44/92/22 +f 47/93/23 45/94/23 46/95/23 48/96/23 +f 45/97/24 41/98/24 42/99/24 46/100/24 +f 48/101/25 46/102/25 42/103/25 44/104/25 diff --git a/test/test-obj.cpp b/test/test-obj.cpp index 337df99..64dc030 100644 --- a/test/test-obj.cpp +++ b/test/test-obj.cpp @@ -12,10 +12,9 @@ BOOST_AUTO_TEST_CASE(objparse) BOOST_REQUIRE_EQUAL(0, op.yylex()); BOOST_CHECK_EQUAL(48, op.vertices.size()); BOOST_CHECK_EQUAL(104, op.texCoords.size()); - BOOST_CHECK_EQUAL(16, op.normals.size()); + BOOST_CHECK_EQUAL(25, op.normals.size()); BOOST_CHECK_EQUAL(28, op.faces.size()); - BOOST_CHECK_EQUAL(4, op.faces[0].size()); - BOOST_CHECK_EQUAL(6, op.faces[10].size()); - BOOST_CHECK_EQUAL(6, op.faces[11].size()); + BOOST_CHECK_EQUAL(6, op.faces[0].size()); + BOOST_CHECK_EQUAL(6, op.faces[1].size()); BOOST_CHECK_EQUAL(4, op.faces[12].size()); } -- cgit v1.2.3