Ignore:
Timestamp:
09/20/06 18:32:10 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ObjParser.cpp

    r1379 r1421  
    211211                        { 
    212212                                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) 
    220215                                { 
    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                                        } 
    222225                                } 
    223 #else 
    224                                 Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 
     226                                else 
     227                                { 
     228                                        Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 
    225229                                 
    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                                        } 
    235240                                } 
    236 #endif 
    237241                                break; 
    238242                        }   // end face 
     
    242246        } 
    243247 
    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 
    251257        // reset tables 
    252258        hashTable.clear(); 
Note: See TracChangeset for help on using the changeset viewer.