Changeset 2597 for GTP/trunk/Lib/Vis
- Timestamp:
- 01/15/08 14:54:09 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
r2544 r2597 334 334 { 335 335 Intersectable *tObj = currentRay.mTerminationObject; 336 // q matt: can this be possible 337 if (!tObj) return 0; 338 336 339 Triangle3 hitTriangle; 337 340 338 341 // other types not implemented yet 339 342 if (tObj->Type() == Intersectable::TRIANGLE_INTERSECTABLE) 340 {341 343 hitTriangle = static_cast<TriangleIntersectable *>(tObj)->GetItem(); 342 }343 344 else 344 {345 345 cout << "border sampling: " << tObj->Type() << " not yet implemented" << endl; 346 }347 346 348 347 VertexContainer enlargedTriangle; … … 407 406 408 407 VssRayContainer invalidSamples; 408 409 409 410 410 // handle rays … … 581 581 582 582 //CLEAR_CONTAINER(invalidSamples); 583 //Debug << "generated " << numSamples << " samples in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl;583 Debug << "generated " << numSamples << " samples in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 584 584 return (int)simpleRays.size(); 585 585 } … … 609 609 while (!mRayQueue.empty())//&& (mGvsStats.mTotalSamples + castSamples < mTotalSamples) ) 610 610 { 611 //cout << "queue size: " << mRayQueue.size() << endl; 611 612 // handle next ray 612 613 VssRay *ray = mRayQueue.top(); … … 616 617 617 618 castSamples += newSamples; 618 619 619 //delete ray; 620 620 } 621 621 622 // HACK623 622 /*if (mRayCaster->mVssRayPool.mIndex > mSamplesPerPass) 624 623 { … … 692 691 ExportVssRays(exporter, mVssRays); 693 692 693 694 694 ///////////////// 695 695 //-- export view cell geometry 696 696 697 exporter->SetWireframe();697 //exporter->SetWireframe(); 698 698 699 699 m.mDiffuseColor = RgbColor(0, 1, 0); … … 742 742 void GvsPreprocessor::ProcessViewCell() 743 743 { 744 //Intersectable::NewMail(); 745 746 // compute direct intersections with view cell 744 // compute object that directly intersect view cell 747 745 IntersectWithViewCell(); 748 746 … … 751 749 int passSamples = 0; 752 750 751 //if (mCurrentViewCell->GetId() != 82975 )return; 752 753 753 //while (mGvsStats.mPerViewCellSamples < mTotalSamples) 754 754 while (1) … … 762 762 if (!mOnlyRandomSampling) 763 763 newSamples += ProcessQueue(); 764 764 765 765 passSamples += newSamples; 766 767 766 mGvsStats.mPerViewCellSamples += newSamples; 767 768 768 if (passSamples >= mGvsSamplesPerPass) 769 769 { … … 781 781 // termination criterium 782 782 if (mGvsStats.mPassContribution < mMinContribution) 783 {784 783 break; 785 }786 784 787 785 // reset … … 800 798 801 799 int i = 0; 800 802 801 if (!vcPoints->empty()) 803 802 { 804 cout << " loading view cell list" << endl;803 cout << "processing view cell list" << endl; 805 804 806 805 vector<ViewCellPoints *>::const_iterator vit, vit_end = vcPoints->end(); … … 837 836 break; 838 837 } 839 //if (viewCell->GetId() == 36658) 840 //{ 838 841 839 mViewCells.push_back(viewCell); 842 // return;843 //}844 840 } 845 841 … … 1128 1124 if (mPerViewCell) 1129 1125 { 1130 // list of view cells to compute1126 // provide list of view cells to compute 1131 1127 CompileViewCellsList(); 1128 1129 // start per view cell gvs 1132 1130 PerViewCellComputation(); 1133 1131
Note: See TracChangeset
for help on using the changeset viewer.