Ignore:
Timestamp:
02/06/06 19:09:53 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r598 r600  
    7777    int hits = 0; 
    7878  static Ray ray; 
    79   AxisAlignedBox3 box = mKdTree->GetBox(); 
     79  AxisAlignedBox3 box =  mViewSpaceBox ? *mViewSpaceBox : mKdTree->GetBox(); 
    8080 
    8181  AxisAlignedBox3 sbox = box; 
     
    203203{ 
    204204  Vector3 point; 
    205   if (!use2dSampling) { 
    206         if (0) { 
    207           Vector3 normal; 
    208           int i = Random((int)mObjects.size()); 
    209           Intersectable *object = mObjects[i]; 
    210           object->GetRandomSurfacePoint(point, normal); 
    211         } else 
    212           point = mKdTree->GetBox().GetRandomPoint(); 
     205  if (!use2dSampling)  
     206  { 
     207          if (0)  
     208          { 
     209                  Vector3 normal; 
     210                  int i = Random((int)mObjects.size()); 
     211                  Intersectable *object = mObjects[i]; 
     212                  object->GetRandomSurfacePoint(point, normal); 
     213          }  
     214          else 
     215                  point = mKdTree->GetBox().GetRandomPoint(); 
    213216        //        point = viewpoint + UniformRandomVector(); 
    214  
    215   } else { 
    216         AxisAlignedBox3 box; 
    217  
    218         if (viewSpaceBox) 
    219           box =*viewSpaceBox; 
    220         else 
    221           box = mKdTree->GetBox(); 
    222  
    223         point = box.GetRandomPoint(); 
    224         point.y = viewpoint.y; 
     217  }  
     218  else  
     219  { 
     220          AxisAlignedBox3 box; 
     221 
     222          if (viewSpaceBox) 
     223                  box =*viewSpaceBox; 
     224          else 
     225                  box = mKdTree->GetBox(); 
     226 
     227          point = box.GetRandomPoint(); 
     228          point.y = viewpoint.y; 
    225229  } 
    226230 
     
    528532  { 
    529533          if (0) 
    530                 mViewSpaceBox = box; 
     534                  mViewSpaceBox = box; 
    531535          else 
    532536          { 
     
    536540                Vector3 size = mViewSpaceBox->Size(); 
    537541                //size[1] *= 1.25; 
    538                 Vector3 enlarge(size[0] * 0.1f, size[1] * 0.0f, size[2] * 0.1); 
     542                Vector3 enlarge(size[0] * 0.25f, size[1] * 0.0f, size[2] * 0.25f); 
    539543 
    540544                mViewSpaceBox->Enlarge(enlarge); 
Note: See TracChangeset for help on using the changeset viewer.