Ignore:
Timestamp:
10/05/05 18:36:16 (19 years ago)
Author:
mattausch
Message:

updated input file behaviour. started to use pvs templates. removed raycast bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp

    r309 r310  
    3030} 
    3131 
     32bool Preprocessor::ParseViewCellsOptions() 
     33{ 
     34        // parse type of view cells 
     35        char viewCellsStr[64]; 
     36        environment->GetStringValue("ViewCells.hierarchyType", viewCellsStr); 
     37 
     38        int vcType = BSP_VIEW_CELLS; 
     39   
     40        if (strcmp(viewCellsStr, "bspTree") == 0) 
     41                vcType = BSP_VIEW_CELLS; 
     42        else if (strcmp(viewCellsStr, "kdTree") == 0) 
     43                vcType = KD_VIEW_CELLS; 
     44        else if (strcmp(viewCellsStr, "sceneDependent") == 0) 
     45                vcType = SCENE_DEPENDENT; 
     46        else 
     47        { 
     48                cerr<<"Wrong view cells type" << viewCellsStr << endl; 
     49                exit(1); 
     50        } 
     51 
     52        // decide about view cell subdivision type used for preprocessing 
     53        switch (vcType) 
     54        { 
     55        case BSP_VIEW_CELLS: 
     56        case KD_VIEW_CELLS: 
     57                mViewCellsType = vcType; 
     58                break; 
     59        case SCENE_DEPENDENT: 
     60                mViewCellsType = BSP_VIEW_CELLS; // TODO 
     61                break; 
     62        } 
     63 
     64        return true; 
     65} 
     66 
    3267void Preprocessor::DeleteViewCells() 
    3368{ 
     
    108143        switch (BspTree::sConstructionMethod) 
    109144        { 
    110         case BspTree::VIEW_CELLS: 
     145        case BspTree::FROM_INPUT_VIEW_CELLS: 
    111146                mBspTree->Construct(mViewCells); 
    112147                break; 
    113         case BspTree::SCENE_GEOMETRY: 
     148        case BspTree::FROM_SCENE_GEOMETRY: 
    114149                DeleteViewCells(); // we generate new view cells 
    115150                mSceneGraph->CollectObjects(&objects); 
    116151                mBspTree->Construct(objects, &mViewCells); 
    117152                break; 
    118         case BspTree::RAYS: 
     153        case BspTree::FROM_RAYS: 
    119154                DeleteViewCells(); // we generate new view cells         
    120155                mBspTree->Construct(rays, &mViewCells); 
     
    126161        return true; 
    127162} 
     163 
    128164 
    129165 
     
    169205  return false; 
    170206} 
    171  
    172  
    173  
Note: See TracChangeset for help on using the changeset viewer.