Changeset 1588 for GTP/trunk/Lib/Vis
- Timestamp:
- 10/09/06 17:07:02 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r1587 r1588 36 36 Vector3 normal; 37 37 38 const int i = (int)RandomValue(0, float((int)mPreprocessor.mObjects.size() - 1));38 const int i = (int)RandomValue(0, (float)mPreprocessor.mObjects.size() - 0.5f); 39 39 40 40 Intersectable *object = mPreprocessor.mObjects[i]; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1586 r1588 4934 4934 //-- compression 4935 4935 4936 //#if HAS_TO_BE_REDONE4937 4936 if (ViewCellsTreeConstructed() && mCompressViewCells) 4938 4937 { … … 4945 4944 Debug << "number of entries after compress: " << pvsEntries << endl; 4946 4945 } 4947 //#endif4948 4946 4949 4947 ///////////// … … 5399 5397 if (!ViewCellsConstructed()) 5400 5398 return NULL; 5399 5401 5400 if (!mViewSpaceBox.IsInside(point)) 5402 5401 return NULL; 5402 5403 5403 return mHierarchyManager->GetVspTree()->GetViewCell(point, active); 5404 5404 } … … 5684 5684 cout << "finished" << endl; 5685 5685 5686 if (0) 5687 for (int i = 0; i <50; ++ i) 5688 { 5689 Vector3 point = GetViewSpaceBox().GetRandomPoint(); 5690 ViewCell *vc = GetViewCell(point); 5691 } 5686 5692 disposeRays(evaluationSamples, NULL); 5687 5693 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1586 r1588 374 374 375 375 376 377 376 VspLeaf::VspLeaf(VspInterior *parent, ViewCellLeaf *viewCell): 378 377 VspNode(parent), mViewCell(viewCell), mPvs(NULL) … … 380 379 } 381 380 381 382 382 ViewCellLeaf *VspLeaf::GetViewCell() const 383 383 { 384 384 return mViewCell; 385 385 } 386 386 387 387 388 void VspLeaf::SetViewCell(ViewCellLeaf *viewCell) … … 2498 2499 if (node->IsLeaf()) 2499 2500 { 2501 /*const AxisAlignedBox3 box = GetBoundingBox(dynamic_cast<VspLeaf *>(node)); 2502 if (!box.IsInside(point)) 2503 cerr << "error, point " << point << " should be in view cell " << box << endl; 2504 */ 2500 2505 viewcell = dynamic_cast<VspLeaf *>(node)->GetViewCell(); 2501 2506 break; … … 2507 2512 // random decision 2508 2513 if (interior->GetPosition() - point[interior->GetAxis()] < 0) 2514 { 2515 nodeStack.push(interior->GetFront()); 2516 } 2517 else 2518 { 2509 2519 nodeStack.push(interior->GetBack()); 2510 else 2511 nodeStack.push(interior->GetFront()); 2520 } 2512 2521 } 2513 2522 }
Note: See TracChangeset
for help on using the changeset viewer.