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

Legend:

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

    r1405 r1415  
    3333 
    3434 
    35 bool Exporter::ExportOspTree(const OspTree &ospTree, const int maxPvs) 
     35bool Exporter::ExportOspTree(const OspTree &ospTree,  
     36                                                         const int maxPvs 
     37                                                         ) 
    3638{ 
    3739        vector<KdLeaf *> leaves; 
    3840        ospTree.CollectLeaves(leaves); 
    39  
    4041        mUseForcedMaterial = true; 
    4142 
     
    6970                        SetForcedMaterial(RandomMaterial()); 
    7071                } 
    71  
    7272                if (0) ExportGeometry(leaf->mObjects);   
    7373        } 
     
    8080{ 
    8181        KdNode *node = kdObj.GetItem(); 
    82          
    8382        Intersectable::NewMail(); 
    8483 
     
    106105 
    107106bool Exporter::ExportBvHierarchy(const BvHierarchy &bvHierarchy,  
    108                                                                  const int maxPvs) 
     107                                                                 const int maxPvs, 
     108                                                                 AxisAlignedBox3 *box) 
    109109{ 
    110110        vector<BvhLeaf *> leaves; 
     
    112112 
    113113        mUseForcedMaterial = true; 
    114  
    115114        vector<BvhLeaf *>::const_iterator it, it_end = leaves.end(); 
    116115 
     
    126125                        continue; 
    127126 
     127                if (box && !Overlap(*box, leaf->GetBoundingBox())) 
     128                        continue; 
     129 
    128130                SetWireframe(); 
    129131                SetForcedMaterial(white); 
     
    223225 
    224226void Exporter::ExportGeometry(const ObjectContainer &objects,  
    225                                                           const bool exportSingleMesh) 
     227                                                          const bool exportSingleMesh, 
     228                                                          AxisAlignedBox3 *bbox) 
    226229{ 
    227230        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
     
    231234                for (oit = objects.begin(); oit != oit_end; ++ oit) 
    232235                { 
    233                         if (0) SetForcedMaterial(RandomMaterial()); 
    234                         ExportIntersectable(*oit); 
     236                        if (bbox && Overlap(*bbox, (*oit)->GetBox())) 
     237                        { 
     238                                if (0) SetForcedMaterial(RandomMaterial()); 
     239                                ExportIntersectable(*oit); 
     240                        } 
    235241                } 
    236242 
     
    238244        } 
    239245 
     246         
     247        /////////////////////////////////////////// 
    240248        //-- all objects exported as one mesh 
    241249        //-- hack: currently works only for triangles 
     250 
    242251        PolygonContainer polys; 
    243252 
     
    245254        { 
    246255                Intersectable *obj = *oit; 
     256 
     257                if (bbox && !Overlap(*bbox, (*oit)->GetBox())) 
     258                        continue; 
     259 
    247260                switch (obj->Type()) 
    248261                { 
Note: See TracChangeset for help on using the changeset viewer.