Ignore:
Timestamp:
01/18/06 04:55:43 (18 years ago)
Author:
bittner
Message:

rss tree tmp changes for regular sampling

File:
1 edited

Legend:

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

    r537 r549  
    1313#include "GlRenderer.h" 
    1414 
    15 static bool useViewSpaceBox = true; 
     15static bool useViewSpaceBox = false; 
    1616static bool use2dSampling = false; 
    1717 
     
    8282         
    8383  SetupRay(ray, viewPoint, direction); 
     84 
     85  if (!mDetectEmptyViewSpace) 
     86        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     87 
    8488  // cast ray to KD tree to find intersection with other objects 
    8589  Intersectable *objectA, *objectB; 
     
    101105  } 
    102106 
    103   bool detectEmptyViewSpace = true; 
    104          
    105   if (detectEmptyViewSpace) { 
     107 
     108  if (mDetectEmptyViewSpace) { 
    106109        SetupRay(ray, pointA, -direction); 
    107110  } else 
    108111        SetupRay(ray, viewPoint, -direction); 
    109112         
    110          
     113  if (!mDetectEmptyViewSpace) 
     114        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     115 
    111116  if (mKdTree->CastRay(ray)) { 
    112117        objectB = ray.intersections[0].mObject; 
     
    122127 
    123128  //  if (objectA == NULL && objectB != NULL) { 
    124   if (1) { 
     129  if (mDetectEmptyViewSpace) { 
    125130        // cast again to ensure that there is no objectA 
    126131        SetupRay(ray, pointB, direction); 
     
    135140 
    136141  bool validSample = (objectA != objectB); 
    137   if (0 && detectEmptyViewSpace) {   // consider all samples valid 
    138         // check if the viewpoint lies on the line segment AB 
    139         if (Distance(pointA, pointB) < 
    140                 Distance(viewPoint, pointA) + Distance(viewPoint, pointB) - Limits::Small) { 
    141           validSample = false; 
    142         } 
    143   } 
    144          
    145142  if (validSample) { 
    146143        if (objectA) { 
     
    318315  //    exporter->ExportKdTree(*mKdTree); 
    319316  exporter->SetFilled(); 
    320   exporter->ExportScene(mSceneGraph->mRoot); 
     317  // temporarily do not export the scene 
     318  if (0) 
     319        exporter->ExportScene(mSceneGraph->mRoot); 
    321320  exporter->SetWireframe(); 
    322321 
Note: See TracChangeset for help on using the changeset viewer.