Ignore:
Timestamp:
02/12/07 08:37:26 (17 years ago)
Author:
mattausch
Message:

warning: debug version

File:
1 edited

Legend:

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

    r2105 r2113  
    10231023 
    10241024ViewCellsManager *ViewCellsManager::LoadViewCells(const string &filename,  
    1025                                                                                                   ObjectContainer *objects, 
     1025                                                                                                  ObjectContainer &pvsObjects, 
     1026                                                                                                  ObjectContainer &preprocessorObjects, 
    10261027                                                                                                  bool finalizeViewCells, 
    10271028                                                                                                  BoundingBoxConverter *bconverter) 
     
    10321033 
    10331034        const long startTime = GetTime(); 
    1034         bool success = parser.ParseViewCellsFile(filename, &vm, objects, bconverter); 
    1035  
    1036         cout<<"viewcells parsed "<<endl<<flush; 
    1037          
    1038         if (success) 
    1039         { 
    1040                 if (0) 
    1041                 { 
    1042                         vm->ResetViewCells(); 
    1043                 } 
    1044                 else 
    1045                 { 
    1046                         //hack: should work with reset function 
    1047                         ViewCellContainer leaves; 
    1048  
    1049                         vm->mViewCells.clear(); 
    1050                         vm->mViewCellsTree->CollectLeaves(vm->mViewCellsTree->GetRoot(), leaves); 
    1051                  
    1052                         ViewCellContainer::const_iterator it, it_end = leaves.end(); 
    1053  
    1054                         for (it = leaves.begin(); it != it_end; ++ it) 
    1055                         { 
    1056                                 vm->mViewCells.push_back(*it); 
    1057                         } 
    1058                 } 
    1059  
    1060                 vm->mViewCellsFinished = true; 
    1061                 vm->mMaxPvsSize = (int)objects->size(); 
    1062  
    1063                  
    1064                 if (finalizeViewCells) 
    1065                 { 
    1066                         // create the meshes and compute volumes 
    1067                         const bool createMeshes = true; 
    1068                         //const bool createMeshes = false; 
    1069  
    1070                         vm->FinalizeViewCells(createMeshes); 
    1071                 } 
    1072  
    1073                 cout << (int)vm->mViewCells.size() << " view cells loaded in " 
    1074                          << TimeDiff(startTime, GetTime()) * 1e-3f << " secs" << endl; 
    1075  
    1076                 Debug << (int)vm->mViewCells.size() << " view cells loaded in " 
    1077                           << TimeDiff(startTime, GetTime()) * 1e-3f << " secs" << endl; 
    1078         } 
    1079         else 
     1035        const bool success = parser.ParseViewCellsFile(filename,  
     1036                                                                                                   &vm,  
     1037                                                                                                   pvsObjects,  
     1038                                                                                                   preprocessorObjects,  
     1039                                                                                                   bconverter); 
     1040 
     1041        if (!success) 
    10801042        { 
    10811043                Debug << "Error: loading view cells failed!" << endl; 
    10821044                DEL_PTR(vm); 
    1083         } 
    1084  
     1045 
     1046                return NULL; 
     1047        } 
     1048         
     1049        //cout << "viewcells parsed " <<endl; 
     1050 
     1051        if (0) 
     1052        { 
     1053                vm->ResetViewCells(); 
     1054        } 
     1055        else 
     1056        { 
     1057                //hack: should work with reset function 
     1058                ViewCellContainer leaves; 
     1059 
     1060                vm->mViewCells.clear(); 
     1061                vm->mViewCellsTree->CollectLeaves(vm->mViewCellsTree->GetRoot(), leaves); 
     1062                 
     1063                ViewCellContainer::const_iterator it, it_end = leaves.end(); 
     1064 
     1065                for (it = leaves.begin(); it != it_end; ++ it) 
     1066                { 
     1067                        vm->mViewCells.push_back(*it); 
     1068                } 
     1069        } 
     1070 
     1071        vm->mViewCellsFinished = true; 
     1072        vm->mMaxPvsSize = (int)pvsObjects.size(); 
     1073 
     1074        if (finalizeViewCells) 
     1075        { 
     1076                // create the meshes and compute volumes 
     1077                const bool createMeshes = true; 
     1078                //const bool createMeshes = false; 
     1079 
     1080                vm->FinalizeViewCells(createMeshes); 
     1081        } 
     1082 
     1083        cout << (int)vm->mViewCells.size() << " view cells loaded in " 
     1084                 << TimeDiff(startTime, GetTime()) * 1e-3f << " secs" << endl; 
     1085 
     1086        Debug << (int)vm->mViewCells.size() << " view cells loaded in " 
     1087                  << TimeDiff(startTime, GetTime()) * 1e-3f << " secs" << endl; 
     1088         
    10851089        return vm; 
    10861090} 
     
    67816785 
    67826786 
    6783 ViewCellsManager *VspOspViewCellsManager::LoadViewCells(const string &filename,  
    6784                                                                                                                 ObjectContainer *objects, 
    6785                                                                                                                 const bool finalizeViewCells, 
    6786                                                                                                                 BoundingBoxConverter *bconverter) 
    6787                                                                                                   
    6788 { 
    6789         ViewCellsManager *vm =  
    6790                 ViewCellsManager::LoadViewCells(filename, objects, finalizeViewCells, bconverter); 
    6791  
    6792         return vm; 
    6793 } 
    6794  
    6795  
    6796 void 
    6797 VspOspViewCellsManager::CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects) 
     6787void VspOspViewCellsManager::CollectObjects(const AxisAlignedBox3 &box,  
     6788                                                                                        ObjectContainer &objects) 
    67986789{ 
    67996790        mHierarchyManager->CollectObjects(box, objects); 
Note: See TracChangeset for help on using the changeset viewer.