Ignore:
Timestamp:
08/28/06 03:42:51 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1287 r1288  
    420420        else 
    421421        { 
    422                 //-- parse type of view cell container 
    423  
     422                // parse type of view cell container 
    424423                Environment::GetSingleton()->GetStringValue("ViewCells.type", buf);              
    425424            mViewCellsManager = CreateViewCellsManager(buf); 
     
    456455 
    457456 
     457HierarchyManager *Preprocessor::CreateHierarchyManager(const char *name) 
     458{ 
     459        HierarchyManager *hierarchyManager; 
     460 
     461        if (strcmp(name, "osp") == 0) 
     462        { 
     463                // HACK for testing if per kd evaluation works!! 
     464                const bool ishack = true; 
     465                if (ishack) 
     466                        hierarchyManager = new HierarchyManager(mVspTree, mKdTree); 
     467                else 
     468                        hierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::KD_BASED_OBJ_SUBDIV); 
     469        } 
     470        else if (strcmp(name, "bvh") == 0) 
     471        { 
     472                hierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::BV_BASED_OBJ_SUBDIV); 
     473        } 
     474 
     475        return hierarchyManager; 
     476} 
     477 
     478 
    458479ViewCellsManager *Preprocessor::CreateViewCellsManager(const char *name) 
    459480{ 
     
    481502        { 
    482503                mVspTree = new VspTree(); 
    483                                  
    484                 // HACK for testing if per kd evaluation works!! 
    485                 const bool ishack = true; 
    486  
    487                 /*if (ishack) 
    488                         mHierarchyManager = new HierarchyManager(mVspTree, mKdTree); 
    489                 else 
    490                         mHierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::KD_BASED_OBJ_SUBDIV); 
    491                 */ 
    492                 mHierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::BV_BASED_OBJ_SUBDIV); 
    493  
     504                char buf[100];           
     505                Environment::GetSingleton()->GetStringValue("Hierarchy.type", buf);      
     506 
     507                HierarchyManager *mHierarchyManager = CreateHierarchyManager(buf); 
    494508                mViewCellsManager = new VspOspViewCellsManager(vcTree, mHierarchyManager); 
    495509        } 
Note: See TracChangeset for help on using the changeset viewer.