Ignore:
Timestamp:
08/24/06 18:05:53 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1272 r1279  
    1717#include "ObjParser.h" 
    1818#include "BvHierarchy.h" 
     19#include "HierarchyManager.h" 
    1920 
    2021#ifdef GTP_INTERNAL 
     
    125126mVspBspTree(NULL), 
    126127mVspTree(NULL), 
    127 mOspTree(NULL), 
    128 mBvHierarchy(NULL), 
     128mHierarchyManager(NULL), 
    129129mViewCellsManager(NULL), 
    130130mRenderSimulator(NULL), 
    131 mPass(0) 
     131mPass(0), 
     132mRayCastMethod(0) 
    132133{ 
    133134        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer); 
     
    142143        Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", mDetectEmptyViewSpace); 
    143144        Environment::GetSingleton()->GetBoolValue("Preprocessor.exportVisibility", mExportVisibility ); 
     145//#if GTP_INTERNAL // choose other ray cast method 
    144146        Environment::GetSingleton()->GetIntValue("Preprocessor.rayCastMethod", mRayCastMethod); 
    145  
     147//#endif 
    146148        char buffer[256]; 
    147149        Environment::GetSingleton()->GetStringValue("Preprocessor.visibilityFile",  buffer); 
     
    177179  cout << "done.\n"; 
    178180 
    179   cout << "Deleting osp tree...\n"; 
    180   DEL_PTR(mOspTree); 
     181  cout << "Deleting hierarchy manager...\n"; 
     182  DEL_PTR(mHierarchyManager); 
    181183  cout << "done.\n"; 
    182184 
     
    479481        { 
    480482                mVspTree = new VspTree(); 
    481                 //mOspTree = new OspTree(); 
    482                  
     483                                 
    483484                // HACK for testing if per kd evaluation works!! 
    484                 mOspTree = new OspTree(*mKdTree); 
    485  
    486                 mViewCellsManager = new VspOspViewCellsManager(vcTree, mVspTree, mOspTree); 
     485                const bool ishack = true; 
     486 
     487                if (ishack) 
     488                { 
     489                        mHierarchyManager = new HierarchyManager(mVspTree, mKdTree); 
     490                } 
     491                else 
     492                { 
     493                        mHierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::KD_BASED_OBJ_SUBDIV); 
     494                } 
     495 
     496                mViewCellsManager = new VspOspViewCellsManager(vcTree, mHierarchyManager); 
    487497        } 
    488498        else if (strcmp(name, "sceneDependent") == 0) 
     
    500510        } 
    501511 
    502         //vcTree->SetViewCellsManager(mViewCellsManager); 
    503512        return mViewCellsManager; 
    504513} 
     
    767776        //      return new ObjectsInteriorDistribution(*this); 
    768777        default: // no valid strategy 
     778                Debug << "warning: no valid sampling strategy" << endl; 
    769779                return NULL; 
    770780        } 
     
    844854                //Debug << "intel ray: " << *vssRay << endl; 
    845855        } 
     856 
    846857        //cout << "a"; 
    847858        return hits; 
Note: See TracChangeset for help on using the changeset viewer.