@@ -22,22 +22,22 @@ static void PrintInfo(const tinyobj::attrib_t &attrib, const std::vector<tinyobj
22
22
23
23
for (size_t v = 0 ; v < attrib.vertices .size () / 3 ; v++) {
24
24
printf (" v[%ld] = (%f, %f, %f)\n " , v,
25
- static_cast <const double >(attrib.vertices [3 *v+ 0 ] ),
26
- static_cast <const double >(attrib.vertices [3 *v+ 1 ] ),
27
- static_cast <const double >(attrib.vertices [3 *v+ 2 ] ));
25
+ static_cast <const double >(attrib.vertices [v]. x ),
26
+ static_cast <const double >(attrib.vertices [v]. y ),
27
+ static_cast <const double >(attrib.vertices [v]. z ));
28
28
}
29
29
30
30
for (size_t v = 0 ; v < attrib.normals .size () / 3 ; v++) {
31
31
printf (" n[%ld] = (%f, %f, %f)\n " , v,
32
- static_cast <const double >(attrib.normals [3 *v+ 0 ] ),
33
- static_cast <const double >(attrib.normals [3 *v+ 1 ] ),
34
- static_cast <const double >(attrib.normals [3 *v+ 2 ] ));
32
+ static_cast <const double >(attrib.normals [v]. x ),
33
+ static_cast <const double >(attrib.normals [v]. y ),
34
+ static_cast <const double >(attrib.normals [v]. z ));
35
35
}
36
36
37
37
for (size_t v = 0 ; v < attrib.texcoords .size () / 2 ; v++) {
38
38
printf (" uv[%ld] = (%f, %f)\n " , v,
39
- static_cast <const double >(attrib.texcoords [2 *v+ 0 ] ),
40
- static_cast <const double >(attrib.texcoords [2 *v+ 1 ] ));
39
+ static_cast <const double >(attrib.texcoords [v]. x ),
40
+ static_cast <const double >(attrib.texcoords [v]. y ));
41
41
}
42
42
43
43
for (size_t i = 0 ; i < shapes.size (); i++) {
@@ -303,7 +303,8 @@ std::string matStream(
303
303
virtual bool operator () (
304
304
const std::string& matId,
305
305
std::vector<material_t >* materials,
306
- std::map<std::string, int >* matMap,
306
+ // std::map<std::string, int>* matMap,
307
+ std::map<uint32_t , int >* matMap,
307
308
std::string* err)
308
309
{
309
310
(void )matId;
0 commit comments