- Timestamp:
- 02/06/06 19:09:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r598 r600 77 77 int hits = 0; 78 78 static Ray ray; 79 AxisAlignedBox3 box = mKdTree->GetBox();79 AxisAlignedBox3 box = mViewSpaceBox ? *mViewSpaceBox : mKdTree->GetBox(); 80 80 81 81 AxisAlignedBox3 sbox = box; … … 203 203 { 204 204 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(); 213 216 // 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; 225 229 } 226 230 … … 528 532 { 529 533 if (0) 530 mViewSpaceBox = box;534 mViewSpaceBox = box; 531 535 else 532 536 { … … 536 540 Vector3 size = mViewSpaceBox->Size(); 537 541 //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); 539 543 540 544 mViewSpaceBox->Enlarge(enlarge);
Note: See TracChangeset
for help on using the changeset viewer.