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/ViewCellBsp.cpp

    r309 r310  
    1717int BspTree::sMaxCandidates = 10; 
    1818int BspTree::sSplitPlaneStrategy = NEXT_POLYGON;  
    19 int BspTree::sConstructionMethod = VIEW_CELLS; 
     19int BspTree::sConstructionMethod = FROM_INPUT_VIEW_CELLS; 
    2020int BspTree::sTermMaxPolysForAxisAligned = 50; 
    2121 
     
    263263mStoreSplitPolys(false) 
    264264{ 
     265        mypvs<BspNode *> testpvs; testpvs.Find(mRoot); 
    265266        Randomize(); // initialise random generator for heuristics 
    266267} 
     
    10591060void BspTree::ParseEnvironment() 
    10601061{ 
     1062        //-- parse bsp cell tree construction method 
     1063        char constructionMethodStr[60]; 
     1064         
     1065        environment->GetStringValue("BspTree.constructionMethod", constructionMethodStr); 
     1066 
     1067        sConstructionMethod = FROM_INPUT_VIEW_CELLS; 
     1068         
     1069        if (strcmp(constructionMethodStr, "fromViewCells") == 0) 
     1070                sConstructionMethod = FROM_INPUT_VIEW_CELLS; 
     1071        else if (strcmp(constructionMethodStr, "fromSceneGeometry") == 0) 
     1072                sConstructionMethod = FROM_SCENE_GEOMETRY; 
     1073        else if (strcmp(constructionMethodStr, "fromRays") == 0) 
     1074                sConstructionMethod = FROM_RAYS; 
     1075        else  
     1076        { 
     1077                cerr << "Wrong construction method " << constructionMethodStr << endl; 
     1078                exit(1); 
     1079    } 
     1080 
     1081        Debug << "Construction method: " << constructionMethodStr << endl; 
     1082 
    10611083        environment->GetIntValue("BspTree.Termination.maxDepth", sTermMaxDepth); 
    10621084        environment->GetIntValue("BspTree.Termination.maxPolygons", sTermMaxPolygons); 
     
    10921114 
    10931115        Debug << endl; 
    1094  
    1095         //-- parse BSP tree construction method 
    1096         char constructionMethodStr[60]; 
    1097          
    1098         environment->GetStringValue("BspTree.constructionMethod", constructionMethodStr); 
    1099  
    1100         sConstructionMethod = BspTree::VIEW_CELLS; 
    1101          
    1102         if (strcmp(constructionMethodStr, "viewCells") == 0) 
    1103                 sConstructionMethod = BspTree::VIEW_CELLS; 
    1104         else if (strcmp(constructionMethodStr, "sceneGeometry") == 0) 
    1105                 sConstructionMethod = BspTree::SCENE_GEOMETRY; 
    1106         else if (strcmp(constructionMethodStr, "rays") == 0) 
    1107                 sConstructionMethod = BspTree::RAYS; 
    1108         else  
    1109         { 
    1110                 cerr << "Wrong bsp construction method " << constructionMethodStr << endl; 
    1111                 exit(1); 
    1112     } 
    1113  
    1114         Debug << "Construction method: " << constructionMethodStr << endl; 
    11151116} 
    11161117 
Note: See TracChangeset for help on using the changeset viewer.