Ignore:
Timestamp:
09/18/06 10:52:24 (18 years ago)
Author:
mattausch
Message:

fixed kd tree loading / exporting

File:
1 edited

Legend:

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

    r1387 r1414  
    13191319        if (!stream.is_open()) return false; 
    13201320 
     1321        // sort objects by their id 
    13211322        std::stable_sort(objects.begin(), objects.end(), ilt); 
    13221323 
     
    13241325        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    13251326 
    1326         //-- compute bounding box 
     1327 
     1328        /////////////////////////// 
     1329        //-- compute bounding box of object space 
    13271330    for (oit = objects.begin(); oit != oit_end; ++ oit) 
    13281331        { 
    1329                 Intersectable *obj = *oit; 
    1330                 // compute bounding box of view space 
    1331                 mBox.Include(obj->GetBox()); 
    1332         } 
    1333  
    1334         DEL_PTR(mRoot); // we make a new root 
     1332                const AxisAlignedBox3 box = (*oit)->GetBox(); 
     1333                mBox.Include(box); 
     1334        } 
     1335 
     1336        // hack: we make a new root 
     1337        DEL_PTR(mRoot); 
    13351338   
    13361339        KdNode *node = LoadNextNode(stream, NULL, objects); 
     
    13771380                { 
    13781381                        EvaluateLeafStats(tData); 
    1379                         //Debug << "l" << endl; 
     1382                        cout << "l"; 
    13801383                } 
    13811384        } 
Note: See TracChangeset for help on using the changeset viewer.