Ignore:
Timestamp:
08/25/06 18:25:09 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1279 r1286  
    14541454 
    14551455 
     1456void BvHierarchy::ExportObjects(BvhLeaf *leaf, OUT_STREAM &stream) 
     1457{ 
     1458        ObjectContainer::const_iterator oit, oit_end = leaf->mObjects.end(); 
     1459        for (oit = leaf->mObjects.begin(); oit != oit_end; ++ oit) 
     1460        { 
     1461                stream << (*oit)->GetId() << " "; 
     1462        } 
     1463} 
     1464 
     1465 
    14561466void BvHierarchy::ExportNode(BvhNode *node, OUT_STREAM &stream) 
    14571467{ 
     
    14601470                BvhLeaf *leaf = dynamic_cast<BvhLeaf *>(node); 
    14611471 
    1462                 stream << "<Leaf "; 
    1463                 stream << "objects=\""; 
     1472                stream << "<Leaf" 
     1473                           << " min=\"" << leaf->GetBoundingBox().Min() 
     1474                           << " max=\"" << leaf->GetBoundingBox().Max()  
     1475                           << " objects=\""; 
    14641476                 
    1465                 //-- export objects in kd leaves 
    1466                 //if (mExportObjects) ExportObjects(leaf, stream); 
     1477                //-- export objects 
     1478                ExportObjects(leaf, stream); 
    14671479                 
    14681480                stream << "\" />" << endl; 
    1469                 //stream << " </Leaf>" << endl; 
    14701481        } 
    14711482        else 
     
    14731484                BvhInterior *interior = dynamic_cast<BvhInterior *>(node); 
    14741485         
    1475                 stream << "<Interior box=\"" << interior->GetBoundingBox() << "\">" << endl; 
     1486                stream << "<Interior" 
     1487                           << " min=\"" << interior->GetBoundingBox().Min() 
     1488                           << " max=\"" << interior->GetBoundingBox().Max() 
     1489                           << "\">" << endl; 
    14761490 
    14771491                ExportNode(interior->GetBack(), stream); 
Note: See TracChangeset for help on using the changeset viewer.