Changeset 1582 for GTP/trunk/Lib/Vis
- Timestamp:
- 10/07/06 23:13:47 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Camera.cpp
r1328 r1582 71 71 ray.mFlags &= ~(Ray::STORE_TESTED_OBJECTS|Ray::STORE_KDLEAVES); 72 72 73 if (tree->CastRay(ray)) 73 if (tree->CastRay(ray)) 74 74 if (ray.intersections.size()) { 75 cout<<"I"; 75 76 sort(ray.intersections.begin(), ray.intersections.end()); 76 77 MeshInstance *mesh = (MeshInstance*)ray.intersections[0].mObject; -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1581 r1582 431 431 cout << "loading view cells from " << buf << endl; 432 432 433 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, true); 433 // $$ does not compile -> commented out 434 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, true, NULL); 434 435 435 436 if (!mViewCellsManager) -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1581 r1582 1856 1856 { 1857 1857 if (viewcell->GetPvs().GetSampleContribution( 1858 1859 1860 1861 1858 ray.mTerminationObject, 1859 ray.mPdf, 1860 contribution)) 1861 { 1862 1862 ++ ray.mPvsContribution; 1863 } 1864 ray.mRelativePvsContribution += contribution; 1865 1863 ray.mRelativePvsContribution += contribution; 1864 } 1866 1865 } 1867 1866 1868 1867 #if SAMPLE_ORIGIN_OBJECTS 1869 1868 1870 1869 // for directional sampling it is important to count only contributions 1871 1870 // made in one direction!!! 1872 1871 // the other contributions of this sample will be counted for the oposite ray! 1873 1872 1874 1873 if (ray.mOriginObject && 1875 1874 viewcell->GetPvs().GetSampleContribution(ray.mOriginObject, 1876 1875 ray.mPdf, 1877 1876 contribution)) 1878 1877 { 1879 1878 ++ ray.mPvsContribution; 1880 }1881 ray.mRelativePvsContribution += contribution;1879 ray.mRelativePvsContribution += contribution; 1880 } 1882 1881 #endif 1883 1882 } … … 5517 5516 { 5518 5517 ++ ray.mPvsContribution; 5518 ray.mRelativePvsContribution += contribution; 5519 5519 } 5520 ray.mRelativePvsContribution += contribution;5521 5520 #endif 5522 5521 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1581 r1582 430 430 bool GetExportPvs() const; 431 431 432 433 Preprocessor *GetPreprocessor() { 434 return mPreprocessor; 435 } 436 437 void SetPreprocessor(Preprocessor *p) { 438 mPreprocessor = p; 439 } 432 ///////////////////////////// 433 // static members 434 435 /** Loads view cells from file. The view cells manager is created with 436 respect to the loaded view cells. 437 438 @param filename the filename of the view cells 439 @param objects the scene objects 440 @param finalizeViewCells if the view cells should be post processed, i.e. 441 a mesh is created representing the geometry 442 @param bconverter a conversion routine working with the similarities of bounding 443 boxes: if there is a certain similarity of overlap between bounding boxes, two tested 444 candidate objects are considered to be the same objects 445 @returns the view cells manager if loading was successful, false otherwise 446 */ 447 static ViewCellsManager *LoadViewCells(const string &filename, 448 ObjectContainer *objects, 449 const bool finalizeViewCells, 450 BoundingBoxConverter *bconverter = NULL); 440 451 441 452 … … 523 534 524 535 void ViewCellsManager::ResetPvs(); 525 536 537 Preprocessor *GetPreprocessor() const { 538 return mPreprocessor; 539 } 540 541 void SetPreprocessor(Preprocessor *p) { 542 mPreprocessor = p; 543 } 526 544 527 545 protected: … … 623 641 void UpdatePvsForEvaluation(ViewCell *root, ObjectPvs &pvs); 624 642 625 643 644 626 645 //////////////////////////////////////////////// 627 646 … … 720 739 721 740 ~BspViewCellsManager(); 722 741 723 742 int ConstructSubdivision(const ObjectContainer &objects, 724 743 const VssRayContainer &rays);
Note: See TracChangeset
for help on using the changeset viewer.