Ignore:
Timestamp:
06/25/06 06:54:53 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

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

    r1047 r1052  
    41594159        {        
    41604160                // hack pvs 
    4161                 const int savedColorCode = mColorCode; 
    4162                 mColorCode = 1; 
     4161                //const int savedColorCode = mColorCode; 
     4162                //mColorCode = 1; 
    41634163         
    41644164                Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
     
    41764176                        } 
    41774177 
    4178                         if (mExportGeometry) 
     4178                        Material m;  
     4179 
     4180                        m.mDiffuseColor.r = 0.0f; 
     4181                        m.mDiffuseColor.g = 0.5f; 
     4182                        m.mDiffuseColor.b = 0.5f; 
     4183 
     4184            exporter->SetForcedMaterial(m); 
     4185 
     4186                        if (0 && mExportGeometry) 
    41794187                        { 
    41804188                                exporter->ExportGeometry(objects); 
     
    41844192                        if (0 && mExportRays) 
    41854193                        { 
    4186                                 exporter->ExportRays(visRays, RgbColor(0, 1, 0)); 
     4194                                exporter->ExportRays(visRays, RgbColor(1, 0, 0)); 
    41874195                        } 
    41884196 
     
    41914199                        // HACK: export without clip plane 
    41924200                        const bool b = mUseClipPlaneForViz; 
    4193                         mUseClipPlaneForViz = false; 
     4201                        //mUseClipPlaneForViz = false; 
    41944202 
    41954203                        ExportViewCellsForViz(exporter); 
     
    42014209                } 
    42024210 
    4203                 mColorCode = savedColorCode; 
     4211                //mColorCode = savedColorCode; 
    42044212        } 
    42054213 
     
    43984406                                } 
    43994407 
    4400                                 Debug << "here233 " << (int)vcRays.size() << endl; 
     4408                                //Debug << "#rays: " << (int)vcRays.size() << endl; 
    44014409 
    44024410                                //-- export rays piercing this view cell 
     
    46064614                        mVspBspTree->ConstructGeometry(leaf, geom); 
    46074615 
    4608                         const float eps = 0.00000001f; 
     4616                        const float eps = 0.0001f; 
    46094617                        const int cf = geom.Side(plane, eps); 
    46104618 
     
    52455253 
    52465254                        // export rays 
    5247                         if (0 && mExportRays) 
     5255                        if (1 && mExportRays) 
    52485256                        { 
    52495257                                exporter->ExportRays(visRays, RgbColor(0, 1, 0)); 
     
    52535261 
    52545262                        // HACK: export without clip plane 
    5255                         //const bool b = mUseClipPlaneForViz; 
    5256                         //mUseClipPlaneForViz = false; 
     5263                        const bool b = mUseClipPlaneForViz; 
     5264                        mUseClipPlaneForViz = false; 
    52575265 
    52585266                        ExportViewCellsForViz(exporter); 
    52595267                         
    5260                         //mUseClipPlaneForViz = b; 
     5268                        mUseClipPlaneForViz = b; 
    52615269                        delete exporter; 
    52625270 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp

    r1047 r1052  
    12381238                                SetForcedMaterial(RandomMaterial()); 
    12391239                        } 
    1240  
    12411240                        ExportIntersectable(*oit); 
    12421241                } 
    1243  
    12441242                return; 
    12451243        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp

    r1047 r1052  
    777777                        ++ contributingSamples; 
    778778                 
    779                 if (1) leaf->mVssRays.push_back(new VssRay(*ray)); 
     779                if (0) leaf->mVssRays.push_back(new VssRay(*ray)); 
    780780        } 
    781781} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp

    r1027 r1052  
    564564        box.SetMax(1, box.Min(1)); 
    565565 
    566   cout<<"mUseViewSpaceBox="<<mUseViewSpaceBox<<endl; 
     566  cout << "use view space box=" << mUseViewSpaceBox<<endl; 
    567567 
    568568 
     
    575575          else 
    576576          { 
    577                   // HACK: enlarge in y directon 
    578577                  mViewSpaceBox = new AxisAlignedBox3(mKdTree->GetBox()); 
    579578 
    580                   if (1)  
     579                  if (0)  
    581580                  { 
    582                           //Vector3 pmin = mViewSpaceBox->Min(); 
     581                          // HACK: enlarge in y directon 
    583582                          Vector3 size = mViewSpaceBox->Size(); 
    584                           //size[1] *= 1.25; 
    585                           //Vector3 enlarge(size[0] * 0.25f, size[1] * 0.0f, size[2] * 0.25f); 
    586                           Vector3 enlarge(size[0] * 4.0f, 0.0f, 0.0f); 
    587  
    588                           //mViewSpaceBox->Enlarge(enlarge); 
     583                         
     584                          size[1] *= 1.25; 
     585                          Vector3 enlarge(size[0] * 0.25f, size[1] * 0.0f, size[2] * 0.25f); 
     586                          //Vector3 enlarge(size[0] * 4.0f, 0.0f, 0.0f); 
     587 
     588                          mViewSpaceBox->Enlarge(enlarge); 
    589589                          mViewSpaceBox->SetMax(mViewSpaceBox->Max() + enlarge); 
    590590                  }  
    591591                  else  
    592592                  { 
     593                          AxisAlignedBox3 tbox(*mViewSpaceBox); 
     594 
     595                          Vector3 size = mViewSpaceBox->Size(); 
     596                          tbox.SetMax(0, mViewSpaceBox->Max(0) + size[0] * 0.5); 
     597                          tbox.SetMin(0, mViewSpaceBox->Min(0) + size[0]); 
     598                          *mViewSpaceBox = tbox; 
     599 
    593600                          // $$ JB temporary 
    594                           AxisAlignedBox3 tempbox = *mViewSpaceBox; 
     601                          /*AxisAlignedBox3 tempbox = *mViewSpaceBox; 
    595602                           
    596603                          float s = tempbox.Size(0); 
     
    599606                          tempbox.SetMax(0, box.Max(0) + s*0.8f); 
    600607                          tempbox.SetMin(0, box.Min(0) + s*0.8f); 
    601                           *mViewSpaceBox = tempbox; 
     608                          *mViewSpaceBox = tempbox;*/ 
    602609                  }              
    603610          } 
Note: See TracChangeset for help on using the changeset viewer.