Changeset 2003 for GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
- Timestamp:
- 01/21/07 00:40:56 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
r2000 r2003 32 32 Preprocessor(), 33 33 mSamplingType(SamplingStrategy::VIEWCELL_BASED_DISTRIBUTION), 34 //mSamplingType(SamplingStrategy::DIRECTION_BASED_DISTRIBUTION),35 34 mProcessedViewCells(0), 36 35 mCurrentViewCell(NULL) … … 203 202 return false; 204 203 205 if ( 0&& GVS_DEBUG)204 if (1 && GVS_DEBUG) 206 205 mVssRays.push_back(new VssRay(*vssRay)); 207 206 … … 653 652 //exporter->ExportRays(vcRays, RgbColor(1, 0, 0)); 654 653 //exporter->ExportRays(vcRays2, RgbColor(0, 1, 0)); 655 //exporter->ExportRays(vcRays3, RgbColor(1, 1, 1));654 exporter->ExportRays(vcRays3, RgbColor(1, 1, 1)); 656 655 } 657 656 … … 773 772 passSamples += newSamples; 774 773 mGvsStats.mPerViewCellSamples += newSamples; 775 //cout << "here2 " << passSamples % (mSamplesPerPass + 1) << endl;774 776 775 777 776 if (passSamples >= mSamplesPerPass) … … 884 883 (*oit)->mCounter = 0; 885 884 } 885 long lastTime = GetTime(); 886 886 887 887 while (NextViewCell()) … … 896 896 //mGvsStats.mTrianglePvs = mCurrentViewCell->GetPvs().GetSize(); 897 897 mGvsStats.mTrianglePvs = (int)mTrianglePvs.size(); 898 mGvsStats.mTotalTrianglePvs += mGvsStats.mTrianglePvs; 898 899 899 900 ObjectContainer objectPvs; … … 910 911 mGvsStats.mViewCells = mProcessedViewCells;//mPass; 911 912 //mGvsStats.mPerViewCellPvs = mCurrentViewCell->GetPvs().GetSize(); 912 mGvsStats.mPerViewCellPvs = (int) mTrianglePvs.size();913 mGvsStats.mPerViewCellPvs = (int)objectPvs.size(); 913 914 914 915 mGvsStats.mTotalPvs += mGvsStats.mPerViewCellPvs; 915 916 mGvsStats.mTotalSamples += mGvsStats.mPerViewCellSamples; 916 917 918 // timing 919 const long currentTime = GetTime(); 920 921 mGvsStats.mTimePerViewCell = TimeDiff(lastTime, currentTime) * 1e-3f; 922 mGvsStats.mTotalTime += mGvsStats.mTimePerViewCell; 923 924 lastTime = currentTime; 925 917 926 mGvsStats.Stop(); 918 927 mGvsStats.Print(mGvsStatsStream); 919 928 920 929 mTrianglePvs.clear(); 921 930 922 931 if (GVS_DEBUG) … … 1037 1046 1038 1047 //Randomize(0); 1039 1040 1048 mGvsStats.Reset(); 1041 1049 mGvsStats.Start(); … … 1119 1127 void GvsStatistics::Print(ostream &app) const 1120 1128 { 1121 app << "# Pass\n" << mPass << endl;1129 app << "#ViewCells\n" << mViewCells << endl; 1122 1130 app << "#ViewCellId\n" << mViewCellId << endl; 1123 app << "#Time\n" << Time() << endl; 1131 app << "#TotalTime\n" << mTotalTime << endl; 1132 app << "#TimePerViewCell\n" << mTimePerViewCell << endl;; 1133 1134 app << "#RaysPerSec\n" << RaysPerSec() << endl; 1135 1136 app << "#TrianglePvs\n" << mTrianglePvs << endl; 1137 app << "#TotalTrianglePvs\n" << mTotalTrianglePvs << endl; 1138 1139 app << "#PerViewCellPvs\n" << mPerViewCellPvs << endl; 1140 app << "#TotalPvs\n" << mTotalPvs << endl; 1141 1142 app << "#PerViewCellSamples\n" << mPerViewCellSamples << endl; 1124 1143 app << "#TotalSamples\n" << mTotalSamples << endl; 1125 app << "#ScDiff\n" << mPassContribution << endl;1126 1144 app << "#SamplesContri\n" << mTotalContribution << endl; 1127 app << "#ReverseSamples\n" << mReverseSamples << endl;1128 app << "#BorderSamples\n" << mBorderSamples << endl;1129 app << "#GvsRuns\n" << mGvsPass << endl;1130 app << "#ViewCells\n" << mViewCells << endl; 1131 app << "#TotalPvs\n" << mTotalPvs << endl;1132 app << "#PerViewCellPvs\n" << mPerViewCellPvs<< endl;1133 app << "#TrianglePvs\n" << mTrianglePvs << endl;1134 app << "#RaysPerSec\n" << RaysPerSec() << endl; 1135 app << "#PerViewCellSamples\n" << mPerViewCellSamples << endl <<endl;1136 } 1137 1138 1139 } 1145 1146 //app << "#ReverseSamples\n" << mReverseSamples << endl; 1147 //app << "#BorderSamples\n" << mBorderSamples << endl; 1148 1149 //app << "#Pass\n" << mPass << endl; 1150 //app << "#ScDiff\n" << mPassContribution << endl; 1151 //app << "#GvsRuns\n" << mGvsPass << endl; 1152 1153 app << endl; 1154 } 1155 1156 1157 }
Note: See TracChangeset
for help on using the changeset viewer.