Changeset 1405


Ignore:
Timestamp:
09/18/06 02:33:26 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

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

    r1404 r1405  
    309309        //-- create front and back leaf 
    310310 
    311         AxisAlignedBox3 fbox = ComputeBoundingBox(sc.mFrontObjects, &parentBox); 
    312         AxisAlignedBox3 bbox = ComputeBoundingBox(sc.mBackObjects, &parentBox); 
     311        AxisAlignedBox3 fbox = EvalBoundingBox(sc.mFrontObjects, &parentBox); 
     312        AxisAlignedBox3 bbox = EvalBoundingBox(sc.mBackObjects, &parentBox); 
    313313 
    314314        BvhLeaf *back =  
     
    12721272                //-- surface area heuristics 
    12731273 
    1274                 const AxisAlignedBox3 box = ComputeBoundingBox(objects); 
     1274                const AxisAlignedBox3 box = EvalBoundingBox(objects); 
    12751275                const float area = box.SurfaceArea(); 
    12761276 
     
    12901290 
    12911291 
    1292 AxisAlignedBox3 BvHierarchy::ComputeBoundingBox(const ObjectContainer &objects, 
    1293                                                                                                 const AxisAlignedBox3 *parentBox) const 
    1294 { 
     1292AxisAlignedBox3 BvHierarchy::EvalBoundingBox(const ObjectContainer &objects, 
     1293                                                                                         const AxisAlignedBox3 *parentBox) const 
     1294{ 
     1295        // if there are no objects in this box, box size is set to parent box size.  
     1296        // Question: Invalidate box instead? 
    12951297        if (parentBox && objects.empty()) 
    12961298                return *parentBox; 
     
    13041306        { 
    13051307                Intersectable *obj = *oit; 
    1306  
    13071308                // grow bounding box to include all objects 
    13081309                box.Include(obj->GetBox()); 
     
    16071608{ 
    16081609        //-- create new root 
    1609         AxisAlignedBox3 box = ComputeBoundingBox(objects); 
     1610        AxisAlignedBox3 box = EvalBoundingBox(objects); 
    16101611        BvhLeaf *bvhleaf = new BvhLeaf(box, NULL, (int)objects.size()); 
    16111612        bvhleaf->mObjects = objects; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r1379 r1405  
    700700        /** Prepares construction for vsp and osp trees. 
    701701        */ 
    702         AxisAlignedBox3 ComputeBoundingBox( 
     702        AxisAlignedBox3 EvalBoundingBox( 
    703703                const ObjectContainer &objects,  
    704704                const AxisAlignedBox3 *parentBox = NULL) const; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp

    r1404 r1405  
    123123        { 
    124124                BvhLeaf *leaf = *it; 
     125                if (leaf->mObjects.empty()) 
     126                        continue; 
    125127 
    126128                SetWireframe(); 
    127129                SetForcedMaterial(white); 
    128130                ExportBox(leaf->GetBoundingBox()); 
    129                  
    130131                SetFilled(); 
    131132 
     
    238239 
    239240        //-- all objects exported as one mesh 
    240         //-- hack: currently it works only for triangles 
     241        //-- hack: currently works only for triangles 
    241242        PolygonContainer polys; 
    242243 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1404 r1405  
    404404         
    405405  if (exporter) { 
    406     if (scene) 
     406    if (0 && scene) 
    407407      exporter->ExportScene(mSceneGraph->GetRoot()); 
    408408 
    409     if (kdtree) { 
     409    if (0 && kdtree) { 
    410410      exporter->SetWireframe(); 
    411411      exporter->ExportKdTree(*mKdTree); 
    412412    } 
    413413 
    414         if (bsptree) { 
     414        if (0 && bsptree) { 
    415415                //exporter->SetWireframe(); 
    416416                exporter->ExportBspTree(*mBspTree); 
Note: See TracChangeset for help on using the changeset viewer.