Ignore:
Timestamp:
01/13/06 14:17:46 (19 years ago)
Author:
bittner
Message:

vss preprocessor void space identification fixed - by default it is off

File:
1 edited

Legend:

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

    r516 r534  
    20412041   
    20422042  int nrays = leaf->rays.size(); 
    2043  
    2044  
     2043  int startIndex = rays.size(); 
     2044   
    20452045  AxisAlignedBox3 box = GetBBox(leaf); 
    20462046  AxisAlignedBox3 dirBox = GetDirBBox(leaf); 
    20472047 
    20482048 
    2049   AxisAlignedBox3 sBox(box); 
    2050   AxisAlignedBox3 sDirBox(dirBox); 
    2051   const float smoothRange = 0.5f; 
    2052   sBox.Scale(1.0f + smoothRange); 
    2053   sDirBox.Scale(1.0f + smoothRange); 
    2054   int smoothRays = (int)numberOfRays*0.0f; 
    2055    
    2056 #if AVG_LEN 
    2057   float avgLength = 0.0f; 
    2058  
    2059   if (nrays) { 
    2060         const int numAvg = 5; 
    2061          
    2062         int step = (nrays-1)/10; 
    2063         if (step<1) 
    2064           step = 1; 
    2065          
    2066         int summed = 0; 
    2067         float sumLength = 0.0f; 
    2068         for (int i=0; i < nrays; i+=step) { 
    2069           sumLength += leaf->rays[i].mRay->GetSize(); 
    2070           summed++; 
    2071         } 
    2072    
    2073         avgLength = sumLength/summed; 
    2074   } 
    2075 #endif 
     2049  const float smoothRange = 0.0f; 
     2050  if (smoothRange != 0.0f) { 
     2051        box.Scale(1.0f + smoothRange); 
     2052        dirBox.Scale(1.0f + smoothRange); 
     2053  } 
     2054   
    20762055   
    20772056  Exporter *exporter = NULL; 
     
    21492128                                                  leaf->halton.GetNumber(5), 
    21502129                                                  0.0f); 
     2130                 
    21512131                leaf->halton.GenerateNext(); 
    21522132          } else { 
     
    21602140          } 
    21612141           
    2162           if (i < smoothRays) { 
    2163                 origin = sBox.GetPoint(pVector); 
    2164                 dirVector = sDirBox.GetPoint(dVector); 
    2165           } else { 
    2166                 origin = box.GetPoint(pVector); 
    2167                 dirVector = dirBox.GetPoint(dVector); 
    2168           } 
     2142          origin = box.GetPoint(pVector); 
     2143          dirVector = dirBox.GetPoint(dVector); 
     2144 
    21692145          direction = Vector3(sin(dirVector.x), sin(dirVector.y), cos(dirVector.x)); 
    21702146        } 
     
    22162192  } 
    22172193 
     2194   
    22182195  //  cout<<"desired="<<numberOfRays<<" tries="<<i<<endl; 
    2219    
     2196  // assign probabilitites to the generated rays 
     2197  for (i=startIndex; i < rays.size(); i++) 
     2198        rays[i].mProbability = 1.0f; 
     2199           
    22202200  if (exporter) { 
    22212201        exporter->ExportRays(selectedRays, RgbColor(1, 0, 0)); 
     
    22232203        CLEAR_CONTAINER(selectedRays); 
    22242204  } 
     2205   
     2206   
    22252207} 
    22262208 
Note: See TracChangeset for help on using the changeset viewer.