Ignore:
Timestamp:
01/01/06 06:25:55 (19 years ago)
Author:
mattausch
Message:

fixed bug in raycasting
added valid view point regions, get view point only from valid regions

File:
1 edited

Legend:

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

    r485 r487  
    378378 
    379379  if (useViewSpaceBox) 
     380  { 
    380381        mViewSpaceBox = box; 
     382        mViewCellsManager->SetViewSpaceBox(*box); 
     383  } 
    381384  else 
     385  { 
    382386        mViewSpaceBox = NULL; 
    383  
    384  
     387        mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
     388  } 
    385389  VssTree *vssTree = NULL; 
    386390 
     
    395399        int s = Min(mSamplesPerPass, mInitialSamples); 
    396400        for (int k=0; k < s; k++) { 
    397  
    398           Vector3 viewpoint = GetViewpoint(mViewSpaceBox); 
     401      // changed by matt 
     402          //Vector3 viewpoint = GetViewpoint(mViewSpaceBox); 
     403          Vector3 viewpoint;  
     404          mViewCellsManager->GetViewPoint(viewpoint); 
    399405          Vector3 direction = GetDirection(viewpoint, mViewSpaceBox); 
    400406 
     
    453459 
    454460  // construct view cells 
    455   mViewCellsManager->Construct(mObjects, mVssRays, mViewSpaceBox); 
     461  mViewCellsManager->Construct(mObjects, mVssRays); 
    456462 
    457463  vssTree = new VssTree; 
     
    501507        if (!mUseImportanceSampling) { 
    502508          for (int j=0; j < num; j++) { 
    503                 Vector3 viewpoint = GetViewpoint(mViewSpaceBox); 
     509            // changed by matt 
     510                //Vector3 viewpoint = GetViewpoint(mViewSpaceBox); 
     511                Vector3 viewpoint;  
     512                mViewCellsManager->GetViewPoint(viewpoint); 
    504513                Vector3 direction = GetDirection(viewpoint, mViewSpaceBox); 
    505514                rays.push_back(SimpleRay(viewpoint, direction)); 
Note: See TracChangeset for help on using the changeset viewer.