Ignore:
Timestamp:
10/03/06 22:03:58 (18 years ago)
Author:
mattausch
Message:

fixed bug with view space box

File:
1 edited

Legend:

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

    r1520 r1563  
    283283  exporter->SetWireframe(); 
    284284 
    285   if (1 || mViewSpaceBox) { 
     285  if (1) { 
    286286        exporter->SetForcedMaterial(RgbColor(1,0,1)); 
    287287        exporter->ExportBox(mViewCellsManager->GetViewSpaceBox()); 
     
    321321  exporter->SetWireframe(); 
    322322 
    323   if (1 || mViewSpaceBox) { 
     323  if (1) { 
    324324        exporter->SetForcedMaterial(RgbColor(1,0,1)); 
    325325        exporter->ExportBox(mViewCellsManager->GetViewSpaceBox()); 
     
    361361  exporter->SetWireframe(); 
    362362  exporter->ExportKdTree(*mKdTree); 
    363          
    364   if (mViewSpaceBox) { 
    365         exporter->SetForcedMaterial(RgbColor(1,0,0)); 
    366         exporter->ExportBox(*mViewSpaceBox); 
    367         exporter->ResetForcedMaterial(); 
    368   } 
    369363         
    370364  exporter->SetForcedMaterial(RgbColor(0,0,1)); 
     
    510504  int totalSamples = 0; 
    511505 
    512   mViewSpaceBox = NULL; 
    513  
    514506  // if not already loaded, construct view cells from file 
    515507  if (!mLoadViewCells) 
    516508  { 
    517         if (1)  
    518           mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
    519         else { 
    520           AxisAlignedBox3 box = mKdTree->GetBox(); 
    521            
    522           if (1) { 
    523                 // use a small box outside of the scene 
    524                 box.Scale(Vector3(0.1f,0.5f,0.5f)); 
    525                 box.Translate(Vector3(Magnitude(mKdTree->GetBox().Size())*0.5f, 0, 0)); 
    526           } else { 
    527                 float s = box.Size(0); 
    528                 box.Scale(0.1f); 
    529                 box.SetMin(0, box.Min(0) + s); 
    530                 box.SetMax(0, box.Max(0) + s); 
    531           } 
    532           
    533           mViewCellsManager->SetViewSpaceBox(box); 
    534         } 
    535          
    536         // construct view cells using it's own set of samples 
    537         mViewCellsManager->Construct(this); 
    538          
    539         //-- several visualizations and statistics 
    540         Debug << "view cells construction finished: " << endl; 
    541         mViewCellsManager->PrintStatistics(Debug); 
    542   } 
    543    
     509          // construct view cells using it's own set of samples 
     510          mViewCellsManager->Construct(this); 
     511 
     512          //-- several visualizations and statistics 
     513          Debug << "view cells construction finished: " << endl; 
     514          mViewCellsManager->PrintStatistics(Debug); 
     515  } 
     516 
    544517   
    545518  int rssPass = 0; 
Note: See TracChangeset for help on using the changeset viewer.