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/HierarchyManager.cpp

    r1379 r1415  
    309309{ 
    310310        cout << "starting bv hierarchy construction ... " << endl; 
    311  
    312311        mBvHierarchy->CreateRoot(objects); 
    313312 
     
    317316 
    318317        mTotalCost = mBvHierarchy->mTotalCost; 
    319         Debug << "reseting cost, new total cost: " << mTotalCost << endl; 
     318        Debug << "\nreseting cost, new total cost: " << mTotalCost << endl; 
    320319 
    321320    mTQueue.Push(sc); 
     
    373372                } 
    374373        } 
     374 
    375375        return true;//!globalTerminationCriteriaMet; 
    376376} 
     
    458458                } 
    459459                 
    460                 /////////////////////////// 
     460                /////////////////// 
    461461                //-- subdivide leaf node 
     462 
    462463                if (ApplySubdivisionCandidate(mCurrentCandidate)) 
    463464                { 
    464                         cout << "subdividing candidate " << ++ i << " of type " << mCurrentCandidate->Type() << endl; 
     465                        cout << mCurrentCandidate->Type() << " "; 
     466                        if (0) cout << "subdividing candidate " << ++ i << " of type " << mCurrentCandidate->Type() << endl; 
    465467                        mHierarchyStats.nodes += 2; 
    466468 
     
    474476 
    475477                // we use objects for evaluating vsp tree construction until  
    476                 // a certain depth once a certain depth existiert .... 
     478                // a certain depth once a certain depth existiert ... 
    477479                if (StartObjectSpaceSubdivision()) 
    478480                { 
    479481                        mObjectSpaceSubdivisionType = mSavedObjectSpaceSubdivisionType; 
    480482 
    481                         cout << "starting object space subdivision at depth "  
     483                        cout << "\nstarting object space subdivision at depth "  
    482484                                 << mVspTree->mVspStats.maxDepth << " ("  
    483485                                 << mMinDepthForObjectSpaceSubdivion << ") " << endl; 
     
    494496                        mViewSpaceSubdivisionType = mSavedViewSpaceSubdivisionType; 
    495497 
    496                         cout << "starting view space subdivision at depth "  
     498                        cout << "\nstarting view space subdivision at depth "  
    497499                                 << GetObjectSpaceSubdivisionDepth() << " ("  
    498500                                 << mMinDepthForViewSpaceSubdivion << ") " << endl; 
     
    608610        vector<SubdivisionCandidate *> dirtyList; 
    609611        CollectDirtyCandidates(dirtyList); 
    610         cout << "repairing " << (int)dirtyList.size() << " candidates ... "; 
    611          
     612        if (0) cout << "repairing " << (int)dirtyList.size() << " candidates ... "; 
     613         
     614        ///////////////////////////////// 
    612615        //-- reevaluate the dirty list 
     616 
    613617        SubdivisionCandidateContainer::const_iterator sit, sit_end = dirtyList.end(); 
    614618         
     
    638642        mHierarchyStats.repairTime += timeDiff; 
    639643 
    640         cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
     644        if (0) cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 
    641645} 
    642646 
     
    753757        case BV_BASED_OBJ_SUBDIV: 
    754758                { 
    755                         ExportBvHierarchy(exporter, objects); 
     759                        AxisAlignedBox3 bbox = mBvHierarchy->GetBoundingBox(); 
     760                        bbox.Scale(Vector3(0.5, 1, 0.5)); 
     761                         
     762                        ExportBvHierarchy(exporter, objects, &bbox); 
    756763                        break; 
    757764                } 
     
    763770 
    764771void HierarchyManager::ExportBvHierarchy(Exporter *exporter,  
    765                                                                                  const ObjectContainer &objects) const 
     772                                                                                 const ObjectContainer &objects, 
     773                                                                                 AxisAlignedBox3 *bbox) const 
    766774{ 
    767775        exporter->SetWireframe(); 
    768         exporter->ExportBvHierarchy(*mBvHierarchy, 0); 
     776        exporter->ExportBvHierarchy(*mBvHierarchy, 0, bbox); 
    769777} 
    770778 
Note: See TracChangeset for help on using the changeset viewer.