Changeset 3362 for GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter
- Timestamp:
- 04/24/09 18:00:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/PlyConverter.cpp
r3361 r3362 41 41 Face face = faces[i]; 42 42 43 if (faces[i].indices.empty()) cout << "error!!" << endl; 44 43 45 //cout << "size: " << face.indices.size() << endl; 44 for ( size_t j = 0; j < face.indices.size(); ++j)46 for (int j = (int)face.indices.size() - 1; j >= 0; -- j) 45 47 { 46 SimpleVec h = vertices[faces[i].indices[j]]; 48 //cout << "h " << j << " " << face.indices.size() << endl; 49 50 SimpleVec h = vertices[face.indices[j]]; 47 51 SimpleVec v; 48 52 49 v.x = h.x * 14;53 v.x = -h.x * 14; 50 54 v.y = h.z * 14; 51 55 v.z = h.y * 14; … … 76 80 77 81 // no face normals? => create normals 78 const SimpleTri tri(geom->mVertices[idx + 2],82 const SimpleTri tri(geom->mVertices[idx + 0], 79 83 geom->mVertices[idx + 1], 80 geom->mVertices[idx + 0]);84 geom->mVertices[idx + 2]); 81 85 82 86 const SimpleVec n = tri.GetNormal();
Note: See TracChangeset
for help on using the changeset viewer.