Changeset 519 for trunk/VUT/GtpVisibilityPreprocessor/src
- Timestamp:
- 01/11/06 23:37:19 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r518 r519 321 321 322 322 323 AxisAlignedBox3 ViewCellsManager::GetViewSpaceBox() const 324 { 325 return mSceneBox; 326 } 327 328 323 329 void ViewCellsManager::ResetViewCells() 324 330 { … … 344 350 Ray hray(ray); 345 351 float tmin = 0, tmax = 1.0; 346 Debug << "here3" << endl; 352 347 353 //hray.Init(ray.GetOrigin(), ray.GetDir(), Ray::LINE_SEGMENT); 348 if (!Get SceneBbox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax))354 if (!GetViewSpaceBox().GetRaySegment(hray, tmin, tmax) || (tmin > tmax)) 349 355 return; 350 356 … … 594 600 // compute view cell area as subsititute for probability 595 601 #if 0 596 return GetArea(viewCell) / Get SceneBbox().SurfaceArea();602 return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 597 603 #else 598 604 return GetArea(viewCell) / GetAccVcArea(); … … 604 610 { 605 611 return viewCell->GetPvs().GetSize() * objRendercost; 606 }607 608 609 AxisAlignedBox3 BspViewCellsManager::GetSceneBbox() const610 {611 return mBspTree->GetBoundingBox();612 612 } 613 613 … … 1110 1110 // compute view cell area / volume as subsititute for probability 1111 1111 #if 0 1112 return GetArea(viewCell) / Get SceneBbox().SurfaceArea();1112 return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 1113 1113 #endif 1114 1114 #if 1 … … 1116 1116 #endif 1117 1117 #if 0 1118 return GetVolume(viewCell) / Get SceneBbox().GetVolume();1118 return GetVolume(viewCell) / GetViewSpaceBox().GetVolume(); 1119 1119 #endif 1120 1120 } … … 1127 1127 1128 1128 1129 AxisAlignedBox3 KdViewCellsManager::GetSceneBbox() const1130 {1131 return mKdTree->GetBox();1132 }1133 1134 1129 void KdViewCellsManager::CollectViewCells() 1135 1130 { 1136 1131 //mKdTree->CollectViewCells(mViewCells); TODO 1137 1132 } 1133 1138 1134 1139 1135 int KdViewCellsManager::Construct(const ObjectContainer &objects, … … 1408 1404 // volume or area substitutes for view point probability 1409 1405 #if 0 1410 return GetArea(viewCell) / Get SceneBbox().SurfaceArea();1406 return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 1411 1407 #else 1412 1408 return GetArea(viewCell) / GetAccVcArea(); … … 1495 1491 1496 1492 return 0; 1497 }1498 1499 1500 AxisAlignedBox3 VspKdViewCellsManager::GetSceneBbox() const1501 {1502 return mVspKdTree->GetBBox(mVspKdTree->GetRoot());1503 1493 } 1504 1494 … … 1767 1757 { 1768 1758 #if 0 1769 return GetArea(viewCell) / Get SceneBbox().SurfaceArea();1759 return GetArea(viewCell) / GetViewSpaceBox().SurfaceArea(); 1770 1760 #else 1771 1761 return GetArea(viewCell) / GetAccVcArea(); … … 1784 1774 { 1785 1775 return viewCell->GetPvs().GetSize() * objRendercost; 1786 }1787 1788 1789 AxisAlignedBox3 VspBspViewCellsManager::GetSceneBbox() const1790 {1791 return mVspBspTree->GetBoundingBox();1792 1776 } 1793 1777 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.h
r517 r519 214 214 virtual float GetVolume(ViewCell *viewCell) const; 215 215 216 virtual AxisAlignedBox3 GetSceneBbox() const = 0;217 218 216 /** Sets the current renderer mainly for view cells statistics. 219 217 */ … … 232 230 */ 233 231 void SetViewSpaceBox(const AxisAlignedBox3 &box); 232 233 AxisAlignedBox3 GetViewSpaceBox() const; 234 234 235 235 /** Creates mesh for this view cell. … … 365 365 float GetRendercost(ViewCell *viewCell, float objRendercost) const; 366 366 367 AxisAlignedBox3 GetSceneBbox() const;368 369 367 /** Get a viewcell containing the specified point */ 370 368 ViewCell *GetViewCell(const Vector3 &point); … … 442 440 float GetProbability(ViewCell *viewCell); 443 441 float GetRendercost(ViewCell *viewCell, float objRendercost) const; 444 445 AxisAlignedBox3 GetSceneBbox() const;446 442 447 443 void CreateMesh(ViewCell *vc); … … 501 497 float GetRendercost(ViewCell *viewCell, float objRendercost) const; 502 498 503 AxisAlignedBox3 GetSceneBbox() const;504 505 499 void CreateMesh(ViewCell *vc); 506 500 … … 556 550 float GetRendercost(ViewCell *viewCell, float objRendercost) const; 557 551 558 AxisAlignedBox3 GetSceneBbox() const;559 560 552 ViewCell *GetViewCell(const Vector3 &point); 561 553
Note: See TracChangeset
for help on using the changeset viewer.