Ignore:
Timestamp:
10/10/05 04:19:59 (19 years ago)
Author:
mattausch
Message:

bsp viewcells now work

File:
1 edited

Legend:

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

    r312 r313  
    2828{ 
    2929        X3dParser parser; 
     30        int maxViewCells = 0; 
    3031        environment->GetFloatValue("ViewCells.height", parser.mViewCellHeight); 
    31           
    32         return parser.ParseFile(filename, mViewCells); 
     32        environment->GetIntValue("ViewCells.maxViewCells", maxViewCells); 
     33 
     34        bool loaded = parser.ParseFile(filename, mViewCells); 
     35 
     36        if (maxViewCells > 0) 
     37        { 
     38                while (mViewCells.size() > maxViewCells) 
     39                { 
     40                        ViewCell *vc = mViewCells.back(); 
     41                        DEL_PTR(vc); 
     42                        mViewCells.pop_back(); 
     43                } 
     44        } 
     45        return loaded; 
    3346} 
    3447 
     
    8497 
    8598        int maxViewCells = 0; 
    86         environment->GetIntValue("BspTree.maxViewCells", maxViewCells); 
     99        environment->GetIntValue("ViewCells.maxViewCells", maxViewCells); 
    87100 
    88101        mSceneGraph->CollectObjects(&objects); 
Note: See TracChangeset for help on using the changeset viewer.