Ignore:
Timestamp:
01/22/07 20:25:06 (17 years ago)
Author:
bittner
Message:

pvs efficiency tuning

File:
1 edited

Legend:

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

    r2003 r2015  
    268268 
    269269 
    270 bool VspInterior::IsLeaf() const 
    271 {  
    272         return false;  
    273 } 
    274  
    275  
    276 VspNode *VspInterior::GetBack()  
    277 { 
    278         return mBack; 
    279 } 
    280  
    281  
    282 VspNode *VspInterior::GetFront()  
    283 { 
    284         return mFront; 
    285 } 
    286  
    287  
    288 AxisAlignedPlane VspInterior::GetPlane() const 
    289 { 
    290         return mPlane; 
    291 } 
    292  
    293  
    294 float VspInterior::GetPosition() const 
    295 { 
    296         return mPlane.mPosition; 
    297 } 
    298  
    299  
    300 int VspInterior::GetAxis() const 
    301 { 
    302         return mPlane.mAxis; 
    303 } 
     270 
     271 
    304272 
    305273 
     
    388356 
    389357 
    390 ViewCellLeaf *VspLeaf::GetViewCell() const 
    391 { 
    392         return mViewCell; 
    393 } 
    394358 
    395359 
     
    400364 
    401365 
    402 bool VspLeaf::IsLeaf() const  
    403 {  
    404         return true;  
    405 } 
    406366 
    407367 
     
    23762336        int axis; 
    23772337 
     2338        ViewCell::NewMail(); 
     2339         
    23782340        while (1) 
    23792341        { 
    23802342                if (!node->IsLeaf()) 
    23812343                { 
    2382                         VspInterior *in = dynamic_cast<VspInterior *>(node); 
     2344                        VspInterior *in = (VspInterior *)node; 
    23832345                        position = in->GetPosition(); 
    23842346                        axis = in->GetAxis(); 
     
    24252387                { 
    24262388                        // compute intersection with all objects in this leaf 
    2427                         VspLeaf *leaf = dynamic_cast<VspLeaf *>(node); 
     2389                        VspLeaf *leaf = (VspLeaf *)node; 
    24282390                        ViewCell *viewCell; 
    2429                         if (0) 
    2430                                 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 
    2431                         else 
    2432                                 viewCell = leaf->GetViewCell(); 
    2433  
     2391                        //                      if (0) 
     2392                        //                              viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 
     2393                        //                      else 
     2394 
     2395                        viewCell = leaf->GetViewCell(); 
     2396                         
    24342397                        // don't have to mail if each view cell belongs to exactly one leaf 
    2435                         if (!useMailboxing || !viewCell->Mailed()) 
    2436                         { 
    2437                                 if (useMailboxing) 
    2438                                         viewCell->Mail(); 
    2439  
    2440                                 viewcells.push_back(viewCell); 
    2441                                 ++ hits; 
    2442                         } 
    2443  
     2398                        // $$ JB -> always mailbox so that we have less conditions 
     2399                        if (!viewCell->Mailed()) { 
     2400                          viewCell->Mail(); 
     2401                           
     2402                          viewcells.push_back(viewCell); 
     2403                          ++ hits; 
     2404                        } 
     2405                         
    24442406                        // get the next node from the stack 
    24452407                        if (tStack.empty()) 
    2446                                 break; 
    2447  
     2408                          break; 
     2409                         
    24482410                        entp = extp; 
    24492411                        mint = maxt; 
Note: See TracChangeset for help on using the changeset viewer.