Ignore:
Timestamp:
03/22/06 10:13:28 (18 years ago)
Author:
mattausch
Message:

added exporter for Vrml
added transformations to x3d loader

File:
1 edited

Legend:

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

    r711 r712  
    1616#include "RssPreprocessor.h" 
    1717 
    18 #define SAMPLE_AFTER_SUBDIVISION 1 
    19 #define TEST_EMPTY_VIEW_CELLS 0 
     18// HACK 
     19const static bool SAMPLE_AFTER_SUBDIVISION = true; 
     20const static bool TEST_EMPTY_VIEW_CELLS = false; 
    2021 
    2122 
     
    289290 
    290291        cout << "view cell construction: casting " << mInitialSamples << " initial samples ... "; 
     292 
    291293        //-- construction rays => we use uniform samples for this 
    292294        CastPassSamples(mInitialSamples,  
     
    319321        if (1) // export initial view cells 
    320322        { 
    321                 cout << "exporting initial view cells (=leaves) ... "; 
    322                 Exporter *exporter = Exporter::GetExporter("view_cells.x3d"); 
    323  
     323                const char filename[] = "view_cells.wrl"; 
     324                Exporter *exporter = Exporter::GetExporter(filename); 
     325 
     326         
    324327                if (exporter) 
    325328                { 
     329                        cout << "exporting initial view cells (=leaves) to " << filename << " ... "; 
    326330                        if (mExportGeometry) 
     331                        { 
    327332                                exporter->ExportGeometry(preprocessor->mObjects); 
    328  
     333                        } 
     334 
     335                        //exporter->SetWireframe(); 
    329336                        ExportViewCellsForViz(exporter); 
    330337 
    331338                        delete exporter; 
    332                 } 
    333                 cout << "finished" << endl; 
     339                        cout << "finished" << endl; 
     340                } 
    334341        } 
    335342 
     
    340347        bool dirSamples = (mSamplingType == Preprocessor::DIRECTION_BASED_DISTRIBUTION); 
    341348 
     349        // -- the main loop 
    342350        while (numSamples < n) 
    343351        { 
     
    362370 
    363371                // TODO: leak? 
    364                 if (SAMPLE_AFTER_SUBDIVISION) 
     372                if (1 || SAMPLE_AFTER_SUBDIVISION) 
    365373                        ComputeSampleContributions(constructionSamples, true, false); 
     374 
    366375                cout << "finished" << endl; 
    367376 
     
    606615                neighborhood.pop_back(); 
    607616         
    608                 cout << "vc idx: " << bestViewCellIdx << endl; 
     617                //cout << "vc idx: " << bestViewCellIdx << endl; 
    609618                if (!bestViewCell || !root) 
    610619                        cout << "warning!!" << endl; 
     
    16891698                mColorCode = 1; 
    16901699 
    1691                 Exporter *exporter = Exporter::GetExporter("final_view_cells.x3d"); 
     1700                Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
    16921701         
    16931702                cout << "exporting view cells after merge (pvs size) ... ";      
     
    33773386                int savedColorCode = mColorCode; 
    33783387                mColorCode = 0; 
    3379                 Exporter *exporter = Exporter::GetExporter("final_view_cells.x3d"); 
     3388                Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
    33803389                 
    33813390                if (exporter) 
Note: See TracChangeset for help on using the changeset viewer.