Ignore:
Timestamp:
05/10/06 18:33:35 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells

    r942 r944  
    4242-view_cells_evaluation_samples_per_pass=1000000 \ 
    4343-vsp_bsp_node_queue_type=2 \ 
    44 -view_cells_filename=$LOG_PREFIX/vienna-visibility.xml 
     44-view_cells_filename=$LOG_PREFIX-visibility.xml 
    4545 
    4646mv debug.log $LOG_PREFIX-$METHOD-debug.log 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env

    r942 r944  
    259259#       filename ../data/vienna/viewcells-large-sel.x3d 
    260260#       filename ../scripts/viewcells_vienna.xml 
    261         filename D:/svn/gametools/GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna_visibility.xml 
     261        filename D:/svn/gametools/GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna-visibility.xml 
    262262} 
    263263 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r938 r944  
    356356        { 
    357357                environment->GetStringValue("ViewCells.filename", buf); 
    358                 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, environment); 
     358                mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, environment, true); 
    359359        } 
    360360        else 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r938 r944  
    18611861 
    18621862 
    1863 bool ViewCellsManager::ExportViewCells(const string filename, const bool exportPvs, const ObjectContainer &objects) 
     1863bool ViewCellsManager::ExportViewCells(const string filename,  
     1864                                                                           const bool exportPvs,  
     1865                                                                           const ObjectContainer &objects) 
    18641866{ 
    18651867        return false; 
     
    18801882        // active view cells 
    18811883        ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 
     1884 
    18821885        for (it = mViewCells.begin(); it != it_end; ++ it) 
    18831886        { 
     
    47274730                                                                                                  ObjectContainer *objects, 
    47284731                                                                                                  Environment *env, 
     4732                                                                                                  const bool finalizeViewCells, 
    47294733                                                                                                  BoundingBoxConverter *bconverter) 
     4734                                                                                                  
    47304735{ 
    47314736        ViewCellsParser parser; 
     
    47334738        ViewCellsManager *vm = NULL; 
    47344739 
    4735         Debug << "here23 filename: " << filename << endl; 
    4736         //BoundingBoxConverter bconverter; 
    4737  
    47384740        if (parser.ParseFile(filename, &vm, objects, bconverter, env)) 
    4739         {Debug << "here25 filename: " << filename << endl; 
     4741        { 
     4742                long startTime = GetTime(); 
     4743 
    47404744                //vm->PrepareLoadedViewCells(); 
    47414745                vm->ResetViewCells(); 
     
    47454749 
    47464750                // create the meshes and compute volumes 
    4747                 vm->FinalizeViewCells(true); 
    4748  
    4749                 vm->mViewCellsTree->AssignRandomColors(); 
    4750                 Debug << (int)vm->mViewCells.size() << " view cells loaded" << endl; 
     4751                if (finalizeViewCells) 
     4752                { 
     4753                        vm->FinalizeViewCells(true); 
     4754                        vm->mViewCellsTree->AssignRandomColors(); 
     4755                } 
     4756 
     4757                Debug << (int)vm->mViewCells.size() << " view cells loaded in " 
     4758                          << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    47514759        } 
    47524760        else 
     
    47854793 
    47864794        //-- export the view cells and the pvs 
    4787         stream << "<ViewCells>" << endl; 
     4795        const int numViewCells = mCurrentViewCellsStats.viewCells; 
     4796 
     4797        stream << "<ViewCells number=\"" << numViewCells << "\" />" << endl; 
    47884798         
    47894799        mViewCellsTree->Export(stream, exportPvs); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r938 r944  
    432432                                                                                   ObjectContainer *objects,  
    433433                                                                                   Environment *env, 
     434                                                                                   const bool finalizeViewCells, 
    434435                                                                                   BoundingBoxConverter *bconverter = NULL); 
    435436 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r938 r944  
    126126        // go one up in the tree 
    127127        if (mCurrentBspNode->GetParent()) 
    128         {       Debug << "]"; 
     128        {       cout << "]"; 
    129129                mCurrentBspNode = mCurrentBspNode->GetParent(); 
    130130        } 
     
    136136        // go one up in the tree 
    137137        if (mCurrentViewCell->GetParent()) 
    138         {       Debug << "]"; 
     138        {       cout << "]"; 
    139139                mCurrentViewCell = mCurrentViewCell->GetParent(); 
    140140        } 
     
    159159        // all bounding boxes gathered in this step =>  
    160160        // associate object ids with bounding boxes 
     161        long startTime = GetTime(); 
     162         
    161163        if (mBoundingBoxConverter) 
    162164                mBoundingBoxConverter->IdentifyObjects(mIBoundingBoxes, *mObjects); 
     165 
     166        Debug << "\nconverted bounding boxes to objects in" 
     167                  << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    163168} 
    164169 
     
    190195        if (element == "Interior")  
    191196        { 
    192                 Debug << "["; 
     197                cout << "["; 
    193198                StartBspInterior(attributes); 
    194199        } 
     
    196201        if (element == "Leaf")  
    197202        { 
    198                 Debug << "l"; 
    199                 Debug << "leaf" << endl; 
     203                cout << "l"; 
    200204                StartBspLeaf(attributes); 
    201205        } 
     
    212216        if (element == "ViewCells") 
    213217        { 
    214                 Debug << "parsing view cells" << endl; 
     218                cout << "parsing view cells" << endl; 
    215219                mParseViewCells = true; 
    216220        } 
     
    218222        if (element == "Hierarchy") 
    219223        { 
    220                 Debug << "parsing spatial hierarchy" << endl; 
     224                cout << "parsing spatial hierarchy" << endl; 
    221225                mParseViewCells = false; 
    222226                StartHierarchy(attributes); 
     
    226230        if (element == "ViewSpaceBox") 
    227231        { 
    228                 Debug << "v"; 
     232                cout << "v"; 
    229233                StartViewSpaceBox(attributes); 
    230234        } 
     
    233237        if (element == "BoundingBox") 
    234238        { 
    235                 Debug << "b"; 
     239                cout << "b"; 
    236240                StartBoundingBox(attributes); 
    237241        } 
     
    259263                if (element == "Interior")  
    260264                { 
    261                         Debug << "["; 
     265                        cout << "["; 
    262266                        StartViewCellInterior(attributes); 
    263267                } 
     
    265269                if (element == "Leaf")  
    266270                { 
    267                         Debug << "l"; 
     271                        cout << "l"; 
    268272                        StartViewCellLeaf(attributes); 
    269273                } 
     
    399403        mViewSpaceBox = AxisAlignedBox3(bmin, bmax); 
    400404 
    401         Debug << "view space box: " << mViewSpaceBox << endl; 
     405        Debug << "\nview space box: " << mViewSpaceBox << endl; 
    402406} 
    403407 
     
    437441        mIBoundingBoxes.push_back(IndexedBoundingBox(id, box)); 
    438442 
    439         Debug << "view space box: " << mViewSpaceBox << endl; 
     443        //Debug << "bbox: " << box << endl; 
    440444} 
    441445 
     
    624628 
    625629                mVspBspTree->mBox = mViewSpaceBox; 
    626                 Debug << "creating vsp bsp view cells manager" << endl; 
    627630        } 
    628631        else if (strcmp(name, "vspKdTree") == 0) 
    629632        { 
    630633                // TODO 
     634                Debug << "view cell type: VspKd" << endl; 
    631635                mVspKdTree = new VspKdTree();    
    632636                mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, mEnvironment); 
Note: See TracChangeset for help on using the changeset viewer.