Ignore:
Timestamp:
08/24/06 22:23:33 (18 years ago)
Author:
bittner
Message:

mlrt 16 ray tracing support

File:
1 edited

Legend:

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

    r1272 r1281  
    128128 
    129129// HACK: associate mesh instances with triangles 
    130 void AssociateFacesWithInstance(MeshInstance *mi, vector<Intersectable *> &parents) 
    131 { 
    132         Mesh *mesh = mi->GetMesh(); 
    133  
    134         FaceContainer::const_iterator fit, fit_end = mesh->mFaces.end(); 
    135          
    136         for (fit = mesh->mFaces.begin(); fit != fit_end; ++ fit) 
    137         { 
    138         parents.push_back(mi); 
     130void AssociateFacesWithInstance(MeshInstance *mi, 
     131                                                                vector<FaceParentInfo> &parents) 
     132{ 
     133  Mesh *mesh = mi->GetMesh(); 
     134   
     135  FaceContainer::const_iterator fit, fit_end = mesh->mFaces.end(); 
     136  int i = 0; 
     137  for (fit = mesh->mFaces.begin(); fit != fit_end; ++ fit, i++) 
     138        { 
     139          parents.push_back(FaceParentInfo(mi, i)); 
    139140        } 
    140141} 
     
    144145                                                  SceneGraphNode **proot, 
    145146                                                  const bool loadPolygonsAsMeshes, 
    146                                                   vector<Intersectable *> *parents) 
     147                                                  vector<FaceParentInfo> *parents) 
    147148{ 
    148149        FILE *file; 
     
    192193                                         
    193194                                        if (parents)  
    194                                         { 
     195                                          { 
    195196                                                AssociateFacesWithInstance(mi, *parents); 
    196                                         } 
    197  
     197                                          } 
     198                                         
    198199                                        // reset tables 
    199200                                        hashTable.clear(); 
Note: See TracChangeset for help on using the changeset viewer.