Changeset 1421 for GTP/trunk/Lib/Vis/Preprocessing/src/ObjParser.cpp
- Timestamp:
- 09/20/06 18:32:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ObjParser.cpp
r1379 r1421 211 211 { 212 212 cout << "f"; 213 #if CONNECT_SEQUENTIAL_FACES 214 Face *face = LoadFace(str, vertices, hashTable); 215 if (!face) break; 216 217 faces.push_back(face); 218 219 if (faces.size() >= nMaxFaces) 213 214 if (loadMeshes) 220 215 { 221 ProcessMesh(faces, hashTable, root, parents); 216 Face *face = LoadFace(str, vertices, hashTable); 217 if (!face) break; 218 219 faces.push_back(face); 220 221 if (faces.size() >= nMaxFaces) 222 { 223 ProcessMesh(faces, hashTable, root, parents); 224 } 222 225 } 223 #else 224 Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 226 else 227 { 228 Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 225 229 226 TriangleIntersectable *obj = new TriangleIntersectable(triangle); 227 root->mGeometry.push_back(obj); 228 229 // matt: we don't really need to keep an additional data structure 230 // if working with triangles => remove this 231 if (parents) 232 { 233 FaceParentInfo info(obj, 0); 234 parents->push_back(info); 230 TriangleIntersectable *obj = new TriangleIntersectable(triangle); 231 root->mGeometry.push_back(obj); 232 233 // matt: we don't really need to keep an additional data structure 234 // if working with triangles => remove this 235 if (parents) 236 { 237 FaceParentInfo info(obj, 0); 238 parents->push_back(info); 239 } 235 240 } 236 #endif237 241 break; 238 242 } // end face … … 242 246 } 243 247 244 #if CONNECT_SEQUENTIAL_FACES 245 // there could be faces remaining 246 if (!faces.empty()) 247 { 248 ProcessMesh(faces, hashTable, root, parents); 249 } 250 #endif 248 if (loadMeshes) 249 { 250 // there could be faces remaining 251 if (!faces.empty()) 252 { 253 ProcessMesh(faces, hashTable, root, parents); 254 } 255 } 256 251 257 // reset tables 252 258 hashTable.clear();
Note: See TracChangeset
for help on using the changeset viewer.