- Timestamp:
- 01/18/06 04:55:43 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r537 r549 13 13 #include "GlRenderer.h" 14 14 15 static bool useViewSpaceBox = true;15 static bool useViewSpaceBox = false; 16 16 static bool use2dSampling = false; 17 17 … … 82 82 83 83 SetupRay(ray, viewPoint, direction); 84 85 if (!mDetectEmptyViewSpace) 86 ray.mFlags &= ~Ray::CULL_BACKFACES; 87 84 88 // cast ray to KD tree to find intersection with other objects 85 89 Intersectable *objectA, *objectB; … … 101 105 } 102 106 103 bool detectEmptyViewSpace = true; 104 105 if (detectEmptyViewSpace) { 107 108 if (mDetectEmptyViewSpace) { 106 109 SetupRay(ray, pointA, -direction); 107 110 } else 108 111 SetupRay(ray, viewPoint, -direction); 109 112 110 113 if (!mDetectEmptyViewSpace) 114 ray.mFlags &= ~Ray::CULL_BACKFACES; 115 111 116 if (mKdTree->CastRay(ray)) { 112 117 objectB = ray.intersections[0].mObject; … … 122 127 123 128 // if (objectA == NULL && objectB != NULL) { 124 if ( 1) {129 if (mDetectEmptyViewSpace) { 125 130 // cast again to ensure that there is no objectA 126 131 SetupRay(ray, pointB, direction); … … 135 140 136 141 bool validSample = (objectA != objectB); 137 if (0 && detectEmptyViewSpace) { // consider all samples valid138 // check if the viewpoint lies on the line segment AB139 if (Distance(pointA, pointB) <140 Distance(viewPoint, pointA) + Distance(viewPoint, pointB) - Limits::Small) {141 validSample = false;142 }143 }144 145 142 if (validSample) { 146 143 if (objectA) { … … 318 315 // exporter->ExportKdTree(*mKdTree); 319 316 exporter->SetFilled(); 320 exporter->ExportScene(mSceneGraph->mRoot); 317 // temporarily do not export the scene 318 if (0) 319 exporter->ExportScene(mSceneGraph->mRoot); 321 320 exporter->SetWireframe(); 322 321
Note: See TracChangeset
for help on using the changeset viewer.