Changeset 1740 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/10/06 22:15:56 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1738 r1740 1845 1845 for (oit = pvs.mEntries.begin(); oit != oit_end; ++ oit) 1846 1846 { 1847 BvhIntersectable *intersect = dynamic_cast<BvhIntersectable *>((*oit). first);1847 BvhIntersectable *intersect = dynamic_cast<BvhIntersectable *>((*oit).mObject); 1848 1848 1849 1849 BvhLeaf *leaf = intersect->GetItem(); -
GTP/trunk/Lib/Vis/Preprocessing/src/OspTree.cpp
r1736 r1740 2175 2175 { 2176 2176 ViewCell *vc = *vit; 2177 PvsData *vdata = vc->GetPvs().Find(obj);2177 /*PvsData *vdata = vc->GetPvs().Find(obj); 2178 2178 2179 2179 if (!vdata) … … 2183 2183 } 2184 2184 2185 /*MailablePvsData *vdata = obj->mViewCellPvs.Find(vc);2185 MailablePvsData *vdata = obj->mViewCellPvs.Find(vc); 2186 2186 2187 2187 if (!vdata || !vdata->Mailed()) … … 2256 2256 { 2257 2257 ViewCell *vc = *vit; 2258 PvsData *vdata = vc->GetPvs().Find(obj);2258 /*PvsData *vdata = vc->GetPvs().Find(obj); 2259 2259 2260 2260 if (!vdata) … … 2262 2262 vc->GetPvs().AddSample(obj, 1); 2263 2263 rc += vc->GetVolume(); 2264 //prop += vc->GetVolume();2265 2264 } 2265 */ 2266 2266 } 2267 2267 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1723 r1740 127 127 mBspTree(NULL), 128 128 mVspBspTree(NULL), 129 mHierarchyManager(NULL),130 129 mViewCellsManager(NULL), 131 130 mRenderSimulator(NULL), … … 186 185 cout << "Deleting kd tree...\n"; 187 186 DEL_PTR(mKdTree); 188 cout << "done.\n";189 190 cout << "Deleting hierarchy manager...\n";191 DEL_PTR(mHierarchyManager);192 187 cout << "done.\n"; 193 188 … … 630 625 if (mLoadViewCells) 631 626 { 632 633 634 635 636 637 638 639 640 641 642 627 Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf); 628 cout << "loading view cells from " << buf << endl<<flush; 629 630 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, true, NULL); 631 632 cout << "view cells loaded." << endl<<flush; 633 634 if (!mViewCellsManager) 635 { 636 return false; 637 } 643 638 } 644 639 else … … 646 641 // parse type of view cell container 647 642 Environment::GetSingleton()->GetStringValue("ViewCells.type", buf); 648 643 mViewCellsManager = CreateViewCellsManager(buf); 649 644 650 645 // default view space is the extent of the scene 651 646 AxisAlignedBox3 viewSpaceBox; 652 647 653 648 if (mUseViewSpaceBox) 654 649 { … … 675 670 char vcGeomFilename[100]; 676 671 Environment::GetSingleton()->GetStringValue("ViewCells.geometryFilename", vcGeomFilename); 677 672 678 673 if (loadVcGeometry) 679 674 { … … 691 686 } 692 687 } 693 688 694 689 //////// 695 690 //-- evaluation of render cost heuristics … … 699 694 Environment::GetSingleton()->GetFloatValue("Simulation.vcOverhead", vcOverhead); 700 695 Environment::GetSingleton()->GetFloatValue("Simulation.moveSpeed", moveSpeed); 701 696 702 697 mRenderSimulator = 703 698 new RenderSimulator(mViewCellsManager, objRenderCost, vcOverhead, moveSpeed); 704 699 705 700 mViewCellsManager->SetRenderer(mRenderSimulator); 706 701 707 702 if (mUseGlRenderer || mUseGlDebugger) 708 703 { 709 704 // NOTE: render texture should be power of 2 and square 710 705 // renderer must be initialised … … 712 707 // renderer = new GlRendererBuffer(1024, 768, mSceneGraph, mViewCellsManager, mKdTree); 713 708 // renderer->makeCurrent(); 714 715 709 710 } 716 711 717 712 mViewCellsManager->SetPreprocessor(this); … … 733 728 734 729 735 HierarchyManager *Preprocessor::CreateHierarchyManager(const char *name)736 {737 HierarchyManager *hierarchyManager;738 739 if (strcmp(name, "osp") == 0)740 {741 Debug << "hierarchy manager: osp" << endl;742 // HACK for testing if per kd evaluation works!!743 const bool ishack = false;744 if (ishack)745 hierarchyManager = new HierarchyManager(mKdTree);746 else747 hierarchyManager = new HierarchyManager(HierarchyManager::KD_BASED_OBJ_SUBDIV);748 }749 else if (strcmp(name, "bvh") == 0)750 {751 Debug << "hierarchy manager: bvh" << endl;752 hierarchyManager = new HierarchyManager(HierarchyManager::BV_BASED_OBJ_SUBDIV);753 }754 else // only view space partition755 {756 Debug << "hierarchy manager: obj" << endl;757 hierarchyManager = new HierarchyManager(HierarchyManager::NO_OBJ_SUBDIV);758 }759 760 return hierarchyManager;761 }762 763 764 730 ViewCellsManager *Preprocessor::CreateViewCellsManager(const char *name) 765 731 { … … 790 756 Environment::GetSingleton()->GetStringValue("Hierarchy.type", buf); 791 757 792 mHierarchyManager = CreateHierarchyManager(buf); 793 mViewCellsManager = new VspOspViewCellsManager(vcTree, mHierarchyManager); 758 mViewCellsManager = new VspOspViewCellsManager(vcTree, buf); 794 759 } 795 760 else if (strcmp(name, "sceneDependent") == 0) //TODO -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r1723 r1740 138 138 */ 139 139 ViewCellsManager *CreateViewCellsManager(const char *name); 140 /** Returns a hierarchy manager of the given name.141 */142 HierarchyManager *CreateHierarchyManager(const char *name);143 140 144 141 GlRendererBuffer *GetRenderer(); … … 160 157 /// View space partition bsp tree 161 158 VspBspTree *mVspBspTree; 162 /// Hierarchy manager handling view space and object space partition163 HierarchyManager *mHierarchyManager;164 159 /// BSP tree representing the viewcells 165 160 BspTree *mBspTree; -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.cpp
r1738 r1740 143 143 for (it = mEntries.begin(); it != it_end; ++ it) 144 144 { 145 Intersectable *obj = (*it). first;145 Intersectable *obj = (*it).mObject; 146 146 147 147 switch (obj->Type()) -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r1739 r1740 15 15 16 16 17 template<typename T> 18 struct LtSample 19 { 20 bool operator()(const T a, const T b) const 17 /** Information stored with a PVS entry. Consists of the number 18 the object was seen from the view cell. 19 */ 20 template<typename T, typename S> 21 class PvsEntry 22 { 23 public: 24 25 PvsEntry(T sample, const S &data): mObject(sample), mData(data) {} 26 27 T mObject; 28 S mData; 29 30 template<typename T, typename S> 31 friend int operator< (const PvsEntry<T, S> &a, const PvsEntry<T, S> &b); 32 }; 33 34 35 template<typename T, typename S> 36 int operator< (const PvsEntry<T, S> &a, const PvsEntry<T, S> &b) 37 { 38 return a.mObject < b.mObject; 39 } 40 41 42 template<typename T, typename S> 43 struct LtSample 44 { 45 bool operator()(const PvsEntry<T, S> &a, const PvsEntry<T, S> &b) const 21 46 { 22 return a < b;47 return a.mObject < b.mObject; 23 48 } 24 49 }; 50 25 51 26 52 /** Information stored with a PVS entry. Consists of the number … … 29 55 class PvsData { 30 56 public: 57 PvsData() {} 58 PvsData(const float sumPdf): 59 mSumPdf(sumPdf) {} 60 61 // $$JB in order to return meaningfull values 62 // it assumes that the sum pdf has been normalized somehow!!! 63 inline float GetVisibility() 64 { 65 return mSumPdf; 66 } 67 31 68 /// sum of probability density of visible sample rays 32 69 float mSumPdf; 33 34 PvsData() {} 35 PvsData(const float sumPdf): 70 }; 71 72 73 class MailablePvsData 74 { 75 public: 76 // sum of probability density of visible sample rays 77 float mSumPdf; 78 int mCounter; 79 80 MailablePvsData() {} 81 MailablePvsData(const float sumPdf): 36 82 mSumPdf(sumPdf) {} 37 83 … … 42 88 return mSumPdf; 43 89 } 44 }; 45 46 47 class MailablePvsData 48 { 90 49 91 //////////////////////////// 50 92 // Mailing stuff 51 protected: 52 int mMailbox; 53 54 public: 93 55 94 // last mail id -> warning not thread safe! 56 95 // both mailId and mailbox should be unique for each thread!!! … … 58 97 static int sReservedMailboxes; 59 98 60 61 99 static void NewMail(const int reserve = 1) { 62 100 sMailId += sReservedMailboxes; … … 71 109 72 110 int IncMail() { return ++ mMailbox - sMailId; } 111 73 112 ////////////////////////////////////////// 74 113 75 // sum of probability density of visible sample rays 76 float mSumPdf; 77 int mCounter; 78 79 MailablePvsData() {} 80 MailablePvsData(const float sumPdf): 81 mSumPdf(sumPdf) {} 82 83 // $$JB in order to return meaningfull values 84 // it assumes that the sum pdf has been normalized somehow!!! 85 float GetVisibility() 86 { 87 return mSumPdf; 88 } 89 }; 114 protected: 115 116 int mMailbox; 117 118 }; 119 120 90 121 template<typename T, typename S> 91 class Iterator 92 { 93 //template<typename T, typename S> friend Pvs<T, S>; 94 private: 95 std::vector<std::pair<T, S> >::iterator mIt; 96 //vector<pair<T, S> >::iterator mItEnd; 97 }; 122 class PvsIterator 123 { 124 private: 125 typename vector<PvsEntry<T, S> >::iterator mItCurrent; 126 typename vector<PvsEntry<T, S> >::iterator mItEnd; 127 }; 128 129 98 130 /** Template class representing the Potentially Visible Set (PVS) 99 131 mainly from a view cell, but also e.g., from objects. … … 102 134 class Pvs 103 135 { 136 template<typename T, typename S> 137 friend class PvsIterator; 138 104 139 public: 105 //vector<pair<T, S> >::iterator mItEnd; 106 107 108 template<typename T, typename S> 109 class ConstIterator 110 { 111 // template<typename T, typename S> friend Pvs<T, S>; 112 private: 113 //vector<pair<T, S> >::const_iterator mIt; 114 //vector<pair<T, S> >::const_iteator mItEnd; 115 }; 116 117 Pvs(): mSamples(0), mEntries() {} 118 119 140 141 Pvs(): mSamples(0), mEntries() {} 142 143 Pvs(const vector<PvsEntry<T, S> > &samples); 120 144 //virtual ~Pvs(); 121 145 … … 126 150 bool Empty() const {return mEntries.empty();} 127 151 128 /** Normalize the visibility of entries in order to get comparable129 results152 /** Normalize the visibility of entries in order to get 153 comparable results. 130 154 */ 131 155 void NormalizeMaximum(); 132 156 133 157 /** Merges pvs of a into this pvs. 134 */ 135 void Merge(const Pvs<T, S> &a); 158 Warning: very slow! 159 */ 160 void MergeInPlace(const Pvs<T, S> &a); 136 161 137 162 /** Difference of pvs to pvs b. … … 141 166 142 167 /** Finds sample in PVS. 143 @returns sample if found, NULL otherwise.144 */ 145 S *Find(T sample);168 @returns iterator on the sample. 169 */ 170 typename vector<PvsEntry<T, S> >::iterator Find(T sample); 146 171 147 172 bool GetSampleContribution(T sample, const float pdf, float &contribution); … … 157 182 */ 158 183 float AddSample(T sample, const float pdf); 184 185 /** Adds sample to PVS. 186 @returns contribution of sample (0 or 1) 187 */ 188 float AddSamples(const vector<PvsEntry<T, S> > &samples); 159 189 160 190 /** Adds sample to PVS. 161 191 @returns PvsData 162 192 */ 163 S *AddSample2(T sample, const float pdf); 164 165 /** Adds one pvs to another one. 166 @returns new pvs size 167 */ 168 int AddPvs(const Pvs<T, S> &pvs); 193 typename std::vector<PvsEntry<T, S> >::iterator AddSample2(T sample, const float pdf); 169 194 170 195 /** Subtracts one pvs from another one. … … 173 198 */ 174 199 int SubtractPvs(const Pvs<T, S> &pvs); 200 175 201 /** Returns PVS data, i.e., how often it was seen from the view cell, 176 202 and the object itsef. … … 189 215 /** Compute continuous PVS difference 190 216 */ 191 void ComputeContinuousPvsDifference(Pvs<T, S> &pvs, 192 float &pvsReduction, 193 float &pvsEnlargement); 194 217 void ComputeContinuousPvsDifference(Pvs<T, S> &pvs, 218 float &pvsReduction, 219 float &pvsEnlargement); 195 220 196 221 /** Clears the pvs. … … 201 226 static float GetEntrySize(); 202 227 203 /** Compute continuous PVS difference */ 204 float GetPvsHomogenity(Pvs<T, S> &pvs) { 205 float pvsReduction, pvsEnlargement; 206 207 ComputeContinuousPvsDifference(pvs, 208 pvsReduction, 209 pvsEnlargement); 210 211 return pvsReduction + pvsEnlargement; 212 } 213 214 int Size() { return mEntries.size(); } 215 216 //vector<pair<T, S> >::const_iterator &GetConstIterator() const { return mEntries.begin(); } 217 //vector<pair<T, S> >::iterator &GetIterator() { return mEntries.begin(); } 228 /** Compute continuous PVS difference 229 */ 230 float GetPvsHomogenity(Pvs<T, S> &pvs); 231 232 static void Merge(Pvs<T, S> &mergedPvs, const Pvs<T, S> &a, const Pvs<T, S> &b); 218 233 219 234 //protected: 220 235 221 236 /// vector of PVS entries 222 vector< pair<T, S> > mEntries;237 vector<PvsEntry<T, S> > mEntries; 223 238 224 239 /// Number of samples used to create the PVS … … 227 242 228 243 244 template <typename T, typename S> 245 Pvs<T, S>::Pvs(const vector<PvsEntry<T, S> > &samples) 246 { 247 mEntries.reserve(samples.size()); 248 mEntries = samples; 249 } 250 229 251 230 252 /** … … 236 258 void 237 259 Pvs<T, S>::ComputeContinuousPvsDifference(Pvs<T, S> &b, 238 239 260 float &pvsReduction, 261 float &pvsEnlargement) 240 262 { 241 263 pvsReduction = 0.0f; 242 264 pvsEnlargement = 0.0f; 265 243 266 // Uses sum of log differences, which corresponds to entropy 244 std::vector< pair<T, S> >::iterator it;267 std::vector<PvsEntry<T, S> >::iterator it; 245 268 246 269 for (it = b.mEntries.begin(); it != b.mEntries.end(); ++ it) 247 270 { 248 float bSumPdf = (*it). second.mSumPdf;271 float bSumPdf = (*it).mData.mSumPdf; 249 272 float aSumPdf = 0.0f; 250 S *data = Find((*it).first); 251 252 if (data) 273 274 vector<PvsEntry<T, S> >::iterator oit = Find((*it).mObject); 275 276 const bool entryFound = (it != mEntries.end()) && ((*it).mObject == (*oit).mObject); 277 278 if (entryFound) 253 279 { 254 aSumPdf = data->mSumPdf; 280 aSumPdf = (*it).mData.mSumPdf; 281 255 282 // mark this entry as processed to avoid double counting 256 data->mSumPdf = -aSumPdf;283 (*it).mData.mSumPdf = -aSumPdf; 257 284 } 258 285 259 286 #if 0 260 float diff = bSumPdf - aSumPdf;287 const float diff = bSumPdf - aSumPdf; 261 288 262 289 if (diff > 0.0f) { … … 266 293 } 267 294 #else 268 if (! data)295 if (!entryFound) 269 296 pvsEnlargement += 1.0f; 270 297 #endif 271 298 } 272 299 273 for (it = mEntries.begin(); it != mEntries.end(); ++ it) { 274 float aSumPdf = (*it).second.mSumPdf; 300 for (it = mEntries.begin(); it != mEntries.end(); ++ it) 301 { 302 float aSumPdf = (*it).mData.mSumPdf; 275 303 float bSumPdf = 0.0f; 276 304 if (aSumPdf < 0.0f) { 305 277 306 // this entry was already accounted for! 278 307 // just revert it back 279 (*it). second.mSumPdf = -aSumPdf;308 (*it).mData.mSumPdf = -aSumPdf; 280 309 } else { 281 S *data = b.Find((*it).first); 282 if (data) { 283 bSumPdf = data->mSumPdf; 310 vector<PvsEntry<T, S> >::iterator oit = b.Find((*it).mObject); 311 312 const bool entryFound = (it != mEntries.end()) && ((*it).mObject == (*oit).mObject); 313 314 if (entryFound) { 315 bSumPdf = (*oit).mData.mSumPdf; 284 316 } 285 317 #if 0 286 float diff = bSumPdf - aSumPdf;318 const float diff = bSumPdf - aSumPdf; 287 319 288 320 if (diff > 0.0f) { … … 293 325 294 326 #else 295 if (! data)327 if (!entryFound) 296 328 pvsReduction += 1.0f; 297 329 #endif … … 306 338 int dif = 0; 307 339 308 std::vector< pair<T, S> >::const_iterator it;340 std::vector<PvsEntry<T, S> >::const_iterator it; 309 341 310 342 for (it = b.mEntries.begin(); it != b.mEntries.end(); ++ it) 311 343 { 312 S data= Find((*it).first);313 if ( !data) ++ dif;344 std::vector<PvsEntry<T, S> >::const_iterator bit = Find((*it).first); 345 if (bit == mEntries.end()) ++ dif; 314 346 } 315 347 … … 317 349 } 318 350 319 template <typename T, typename S> void Pvs<T, S>::Merge(const Pvs<T, S> &a) 320 { 321 #if TODO 351 352 template <typename T, typename S> 353 void Pvs<T, S>::MergeInPlace(const Pvs<T, S> &a) 354 { 355 const int samples = mSamples + a.mSamples; 356 357 ObjectPvs interPvs; 358 359 Merge(interPvs, *this, a); 360 361 mEntries.reserve(interPvs.GetSize()); 362 mEntries = interPvs.mEntries; 363 364 mSamples = samples; 365 } 366 367 368 template <typename T, typename S> 369 void Pvs<T, S>::Merge(Pvs<T, S> &mergedPvs, const Pvs<T, S> &a, const Pvs<T, S> &b) 370 { 371 std::vector<PvsEntry<T, S> >::const_iterator ait = a.mEntries.begin(), ait_end = a.mEntries.end(); 372 std::vector<PvsEntry<T, S> >::const_iterator bit = b.mEntries.begin(), bit_end = b.mEntries.end(); 373 374 while (1) 375 { 376 for (; (ait != ait_end) && ((*ait).mObject < (*bit).mObject); ++ ait) 377 { 378 if ((*ait).mObject != (*bit).mObject) 379 mergedPvs.mEntries.push_back(*ait); 380 } 381 382 for (; (bit != bit_end) && ((ait == ait_end) || ((*bit).mObject <= (*bit).mObject)); ++ bit) 383 { 384 if ((*ait).mObject == (*bit).mObject) 385 { 386 PvsData newData((*ait).mData.mSumPdf + (*bit).mData.mSumPdf); 387 PvsEntry<T, S> entry((*ait).mObject, newData); 388 mergedPvs.mEntries.push_back(entry); 389 } 390 else 391 { 392 mergedPvs.mEntries.push_back(*bit); 393 } 394 } 395 } 396 } 397 398 399 /*template <typename T, typename S> void Pvs<T, S>::QuickMerge(const Pvs<T, S> &a) 400 { 322 401 const int samples = mSamples + a.mSamples; 323 402 324 std::vector<pair<T, S>> >::const_iterator it; 325 326 for (it = a.mEntries.begin(); it != a.mEntries.end(); ++ it) 327 { 328 AddSample((*it).first, (*it).second.mSumPdf); 403 std::vector<PvsEntry<T, S>> >::const_iterator it; 404 405 for (it = mEntries.begin(); it != mEntries.end(); ++ it) 406 { 407 it->first->Mail(); 408 } 409 410 for (it = a.mEntries.begin(); it != a.mEntries.end(); ++ it) 411 { 412 if (!it->first->Mailed()) 413 { 414 mEntries.push_back(*it); 415 } 329 416 } 330 417 331 418 mSamples = samples; 332 #endif 333 } 419 }*/ 334 420 335 421 … … 341 427 342 428 template <typename T, typename S> 343 S *Pvs<T, S>::Find(T sample) 344 { 345 #if TODO 346 std::vector<pair<T, S>, LtSample<T> >::iterator i = mEntries.find(sample); 347 348 if (i != mEntries.end()) 349 { 350 return &(*i).second; 351 } 352 else 353 { 354 return NULL; 355 } 356 #else 357 return NULL; 358 #endif 359 } 360 361 template <typename T, typename S> 362 void Pvs<T, S>::GetData(const int index, 363 T &entry, 364 S &data) 365 { 366 std::vector<pair<T, S> >::iterator i = mEntries.begin(); 429 typename std::vector<PvsEntry<T, S> >::iterator Pvs<T, S>::Find(T sample) 430 { 431 PvsEntry<T, S> dummy(sample, PvsData()); 432 vector<PvsEntry<T, S> >::iterator it = lower_bound(mEntries.begin(), mEntries.end(), dummy); 433 434 return it; 435 } 436 437 438 template <typename T, typename S> 439 void Pvs<T, S>::GetData(const int index, T &entry, S &data) 440 { 441 std::vector<PvsEntry<T, S> >::iterator i = mEntries.begin(); 367 442 for (int k = 0; k != index && i != mEntries.end(); ++ i, ++ k); 368 443 … … 373 448 374 449 template <typename T, typename S> 375 float 376 Pvs<T, S>::AddSample(T sample, const float pdf) 377 { 378 #if TODO 450 float Pvs<T, S>::AddSample(T sample, const float pdf) 451 { 379 452 ++ mSamples; 380 S *data = Find(sample); 381 382 if (data) 383 { 453 std::vector<PvsEntry<T, S> >::iterator it = Find(sample); 454 455 if ((it != mEntries.end()) && ((*it).mObject == sample)) 456 { 457 S &data = (*it).mData; 458 data.mSumPdf += pdf; 459 460 return data.mSumPdf; 461 } 462 else 463 { 464 PvsEntry<T, S> entry(sample, pdf); 465 466 mEntries.insert(it, entry); 467 return pdf; 468 } 469 } 470 471 472 template <typename T, typename S> 473 typename vector< PvsEntry<T, S> >::iterator Pvs<T, S>::AddSample2(T sample, const float pdf) 474 { 475 ++ mSamples; 476 std::vector<PvsEntry<T, S> >::iterator it = Find(sample); 477 478 if ((it != mEntries.end()) && ((*it).first == T)) 479 { 480 S &data = (*it).second; 384 481 data->mSumPdf += pdf; 385 return data->mSumPdf;386 482 } 387 483 else 388 484 { 389 mEntries[sample] = S(pdf); 390 return pdf; 391 } 392 #else 393 return 0; 394 #endif 395 } 396 397 398 template <typename T, typename S> 399 S * Pvs<T, S>::AddSample2(T sample, const float pdf) 400 { 401 mSamples++; 402 S *data = Find(sample); 403 404 if (data) 405 { 406 data->mSumPdf += pdf; 407 } 408 else 409 { 410 mEntries[sample] = S(pdf); 411 data = Find(sample); 412 } 413 414 return data; 415 } 485 PvsEntry<T, S> entry(sample, pdf); 486 mEntries.insert(it, entry); 487 } 488 489 return it; 490 } 491 416 492 417 493 template <typename T, typename S> 418 494 bool Pvs<T, S>::AddSample(T sample, 419 const float pdf,420 float &contribution)495 const float pdf, 496 float &contribution) 421 497 { 422 498 ++ mSamples; 423 S *data = Find(sample); 424 #if TODO 425 if (data) 426 { 427 data->mSumPdf += pdf; 428 contribution = pdf / data->mSumPdf; 499 500 std::vector<PvsEntry<T, S> >::iterator it = Find(sample); 501 502 if ((it != mEntries.end()) && ((*it).mObject == sample)) 503 { 504 S &data = (*it).mData; 505 506 data.mSumPdf += pdf; 507 contribution = pdf / data.mSumPdf; 508 429 509 return false; 430 510 } 431 else { 432 mEntries[sample] = S(pdf); 511 else 512 { 513 PvsEntry<T, S> entry(sample, pdf); 514 515 mEntries.insert(it, entry); 516 contribution = 1.0f; 517 518 return true; 519 } 520 } 521 522 523 template <typename T, typename S> 524 bool Pvs<T, S>::GetSampleContribution(T sample, 525 const float pdf, 526 float &contribution) 527 { 528 std::vector<PvsEntry<T, S> >::iterator it = Find(sample); 529 530 if (it != mEntries.end() && ((*it).mObject == sample)) 531 { 532 S &data = (*it).mData; 533 contribution = pdf / (data.mSumPdf + pdf); 534 return false; 535 } 536 else 537 { 433 538 contribution = 1.0f; 434 539 return true; 435 540 } 436 #else 541 } 542 543 544 template <typename T, typename S> 545 bool Pvs<T, S>::RemoveSample(T sample, const float pdf) 546 { 547 -- mSamples; 548 549 std::vector<PvsEntry<T, S> >::iterator it = Find(sample); 550 551 if (it == mEntries.end()) 552 return false; 553 554 S &data = (*it).mData; 555 556 data.mSumPdf -= pdf; 557 558 if (data.mSumPdf <= 0.0f) 559 { 560 mEntries.erase(it); 561 } 562 437 563 return true; 438 #endif 439 } 440 441 template <typename T, typename S> 442 bool 443 Pvs<T, S>::GetSampleContribution(T sample, 444 const float pdf, 445 float &contribution) 446 { 447 S *data = Find(sample); 448 449 if (data) { 450 contribution = pdf / (data->mSumPdf + pdf); 451 return false; 452 } 453 else { 454 contribution = 1.0f; 455 return true; 456 } 457 } 458 459 template <typename T, typename S> 460 bool Pvs<T, S>::RemoveSample(T sample, 461 const float pdf) 462 { 463 -- mSamples; 464 #if TODO 465 std::vector<pair<T, S> >::iterator it = mEntries.find(sample); 466 467 if (it == mEntries.end()) 468 return false; 469 470 S *data = &(*it).second; 471 472 data->mSumPdf -= pdf; 473 474 if (data->mSumPdf <= 0.0f) 475 { 476 mEntries.erase(it); 477 } 478 #endif 479 return true; 480 } 481 482 template <typename T, typename S> 483 int Pvs<T, S>::AddPvs(const Pvs<T, S> &pvs) 484 { 485 int samples = mSamples + pvs.mSamples; 486 std::vector<pair<T, S> >:: 487 const_iterator it, it_end = pvs.mEntries.end(); 488 489 float contri; 490 // output PVS of view cell 491 for (it = pvs.mEntries.begin(); it != it_end; ++ it) 492 { 493 AddSample((*it).first, (*it).second.mSumPdf, contri); 494 } 495 496 mSamples = samples; 497 498 return GetSize(); 499 } 500 564 } 565 566 501 567 template <typename T, typename S> 502 568 int Pvs<T, S>::SubtractPvs(const Pvs<T, S> &pvs) 503 569 { 504 570 const int samples = mSamples - pvs.mSamples; 505 #if TODO 506 std::vector< pair<T, S> >::571 572 std::vector<PvsEntry<T, S> >:: 507 573 const_iterator it, it_end = pvs.mEntries.end(); 508 574 509 575 // output PVS of view cell 510 576 for (it = pvs.mEntries.begin(); it != it_end; ++ it) 511 RemoveSample((*it). first, (*it).second.mSumPdf);577 RemoveSample((*it).mObject, (*it).mData.mSumPdf); 512 578 513 579 mSamples = samples; 514 #endif 580 515 581 return GetSize(); 516 582 } 517 583 584 518 585 template <typename T, typename S> 519 586 void Pvs<T, S>::CollectEntries(std::vector<T> &entries) 520 587 { 521 std::vector< pair<T, S> >::588 std::vector<PvsEntry<T, S> >:: 522 589 const_iterator it, it_end = mEntries.end(); 523 590 … … 527 594 } 528 595 596 529 597 template <typename T, typename S> 530 598 void Pvs<T, S>::NormalizeMaximum() 531 599 { 532 std::vector<pair<T, S> >::533 const_iterator it, it_end = mEntries.end();534 535 536 537 538 539 float sum = (*it)->second.sumPdf;540 if (sum > maxSum)541 542 543 544 545 546 547 (*it)->second.sumPdf *= maxSum;548 549 600 std::vector<PvsEntry<T, S> >:: 601 const_iterator it, it_end = mEntries.end(); 602 603 float maxPdfSum = -1.0f; 604 605 // output PVS of view cell 606 for (it = mEntries.begin(); it != it_end; ++ it) { 607 float sum = (*it)->second.sumPdf; 608 if (sum > maxSum) 609 maxSum = sum; 610 } 611 612 maxSum = 1.0f / maxSum; 613 614 for (it = mEntries.begin(); it != it_end; ++ it) { 615 (*it)->second.sumPdf *= maxSum; 616 } 617 550 618 } 551 619 … … 562 630 { 563 631 return sizeof(T) + sizeof(S); 632 } 633 634 635 template <typename T, typename S> 636 float Pvs<T, S>::GetPvsHomogenity(Pvs<T, S> &pvs) 637 { 638 float pvsReduction, pvsEnlargement; 639 640 ComputeContinuousPvsDifference(pvs, pvsReduction, pvsEnlargement); 641 642 return pvsReduction + pvsEnlargement; 564 643 } 565 644 … … 590 669 //-- typedefs 591 670 592 //typedef std::map<KdNode *, PvsData, LtSample<KdNode *> > KdPvsMap; 593 //typedef std::map<Intersectable *, PvsData, LtSample<Intersectable *> > ObjectPvsEntries; 594 //typedef std::map<ViewCell *, MailablePvsData, LtSample<ViewCell *> > ViewCellPvsEntries; 595 596 597 typedef std::vector<pair<Intersectable *, PvsData> > ObjectPvsEntries; 598 671 typedef std::vector<PvsEntry<Intersectable *, PvsData> > ObjectPvsEntries; 599 672 typedef Pvs<ViewCell *, MailablePvsData> ViewCellPvs; 600 673 -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r1733 r1740 206 206 Name="VCLinkerTool" 207 207 AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtGlRenderer.lib" 208 OutputFile="../bin/release/Preprocessor 2.exe"208 OutputFile="../bin/release/Preprocessor.exe" 209 209 LinkIncremental="1" 210 210 AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;"$(QTDIR)\lib";.\QtGlRenderer\Release" -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r1738 r1740 64 64 for (it = vc->GetPvs().mEntries.begin(); it != it_end; ++ it) 65 65 { 66 if (!(*it). first->Mailed())67 { 68 (*it). first->Mail();66 if (!(*it).mObject->Mailed()) 67 { 68 (*it).mObject->Mail(); 69 69 ++ count; 70 70 } … … 88 88 for (it = pvs1.mEntries.begin(); it != it_end; ++ it) 89 89 { 90 (*it). first->Mail();90 (*it).mObject->Mail(); 91 91 } 92 92 … … 96 96 for (it = pvs2.mEntries.begin(); it != it_end; ++ it) 97 97 { 98 Intersectable *obj = (*it). first;98 Intersectable *obj = (*it).mObject; 99 99 if (!obj->Mailed()) 100 100 ++ pvs; … … 837 837 for (it = pvs1.mEntries.begin(); it != it_end; ++ it) 838 838 { 839 Intersectable *obj = (*it). first;839 Intersectable *obj = (*it).mObject; 840 840 841 841 obj->Mail(); … … 848 848 for (it = pvs2.mEntries.begin(); it != it_end; ++ it) 849 849 { 850 Intersectable *obj = (*it). first;850 Intersectable *obj = (*it).mObject; 851 851 852 852 // test if object already considered … … 1152 1152 inline int AddedPvsSize(ObjectPvs pvs1, const ObjectPvs &pvs2) 1153 1153 { 1154 return pvs1.AddPvs(pvs2); 1154 ObjectPvs interPvs; 1155 ObjectPvs::Merge(interPvs, pvs1, pvs2); 1156 1157 return (int)interPvs.GetSize(); 1155 1158 } 1156 1159 … … 1242 1245 // TODO change 1243 1246 vc1->GetPvs().SubtractPvs(leaf->GetPvs()); 1244 vc2->GetPvs().AddPvs(leaf->GetPvs()); 1245 1247 1248 ObjectPvs interPvs; 1249 ObjectPvs::Merge(interPvs, vc2->GetPvs(), leaf->GetPvs()); 1250 vc2->SetPvs(interPvs); 1251 1246 1252 if (mUseAreaForPvs) 1247 1253 { … … 1651 1657 for (oit = vc->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1652 1658 { 1653 Intersectable *obj = (*oit). first;1659 Intersectable *obj = (*oit).mObject; 1654 1660 if ((cit == interior->mChildren.begin()) && !obj->Mailed()) 1655 1661 obj->Mail(); … … 1673 1679 for (oit = vc->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1674 1680 { 1675 if ((*oit). first->Mailed((int)interior->mChildren.size()))1681 if ((*oit).mObject->Mailed((int)interior->mChildren.size())) 1676 1682 { 1677 interior->GetPvs().AddSample((*oit). first, (*oit).second.mSumPdf);1683 interior->GetPvs().AddSample((*oit).mObject, (*oit).mData.mSumPdf); 1678 1684 } 1679 1685 } … … 1688 1694 for (cit = interior->mChildren.begin(); cit != cit_end; ++ cit) 1689 1695 { 1690 if (!(*cit)->GetPvs().RemoveSample((*oit). first, Limits::Infinity))1696 if (!(*cit)->GetPvs().RemoveSample((*oit).mObject, Limits::Infinity)) 1691 1697 { 1692 1698 Debug << "should not come here!" << endl; … … 1717 1723 { 1718 1724 root = root->GetParent(); 1719 pvs. AddPvs(root->GetPvs());1725 pvs.MergeInPlace(root->GetPvs()); 1720 1726 } 1721 1727 … … 1730 1736 1731 1737 // add newly found pvs to merged pvs 1732 pvs.AddPvs(vc->GetPvs()); 1738 ObjectPvs interPvs; 1739 pvs.MergeInPlace(vc->GetPvs()); 1733 1740 1734 1741 if (!vc->IsLeaf()) // interior cells: go down to leaf level … … 1779 1786 for (oit = (*it)->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1780 1787 { 1781 Intersectable *intersect = (*oit). first;1788 Intersectable *intersect = (*oit).mObject; 1782 1789 1783 1790 if (!intersect->Mailed()) 1784 1791 { 1785 1792 intersect->Mail(); 1786 newPvs.AddSample(intersect, (*oit). second.mSumPdf);1793 newPvs.AddSample(intersect, (*oit).mData.mSumPdf); 1787 1794 } 1788 1795 } … … 1829 1836 for (oit = (*it)->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 1830 1837 { 1831 Intersectable *intersect = (*oit). first;1838 Intersectable *intersect = (*oit).mObject; 1832 1839 1833 1840 if (!intersect->Mailed()) … … 2050 2057 2051 2058 2052 void ViewCellsTree::PropagatePvs(ViewCell * vc)2059 void ViewCellsTree::PropagatePvs(ViewCell *root) 2053 2060 { 2054 ViewCell *viewCell = vc;2061 ViewCell *viewCell = root; 2055 2062 2056 2063 // propagate pvs up 2057 2064 while (viewCell->GetParent()) 2058 2065 { 2059 viewCell->GetParent()->GetPvs().Merge(vc->GetPvs()); 2066 ObjectPvs mergedPvs; 2067 viewCell->GetParent()->GetPvs().MergeInPlace(root->GetPvs()); 2068 2060 2069 viewCell = viewCell->GetParent(); 2061 2070 } 2062 2071 2063 if ( vc->IsLeaf())2072 if (root->IsLeaf()) 2064 2073 return; 2065 2074 2066 2075 // propagate pvs to the leaves 2067 2076 stack<ViewCell *> tstack; 2068 tstack.push( vc);2077 tstack.push(root); 2069 2078 2070 2079 while (!tstack.empty()) … … 2073 2082 tstack.pop(); 2074 2083 2075 if (viewCell != vc)2076 { 2077 viewCell->GetPvs().Merge (vc->GetPvs());2084 if (viewCell != root) 2085 { 2086 viewCell->GetPvs().MergeInPlace(root->GetPvs()); 2078 2087 } 2079 2088 … … 2105 2114 tqueue.pop(); 2106 2115 2107 // save the view cells if it is a leaf or if enough view cells have already been traversed 2108 // because of the priority queue, this will be the optimal set of v 2116 // save the view cells if it is a leaf or if enough view cells 2117 // have already been traversed because of the priority queue, 2118 // this will be the optimal set of v 2109 2119 if (!vc->IsLeaf()) 2110 2120 { … … 2343 2353 for (it = viewCell->GetPvs().mEntries.begin(); it != it_end; ++ it) 2344 2354 { 2345 Intersectable *obj = (*it). first;2355 Intersectable *obj = (*it).mObject; 2346 2356 // hack: just output full pvs 2347 2357 if (obj->Type() == Intersectable::BVH_INTERSECTABLE) … … 2359 2369 else 2360 2370 { 2361 stream << (*it). first->GetId() << " ";2371 stream << (*it).mObject->GetId() << " "; 2362 2372 } 2363 2373 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1738 r1740 1647 1647 1648 1648 vc->GetPvs().Clear(); 1649 vc->GetPvs() = left->GetPvs(); 1650 1651 // merge pvs of right cell 1652 vc->GetPvs().Merge(right->GetPvs()); 1649 ObjectPvs::Merge(vc->GetPvs(), left->GetPvs(), right->GetPvs()); 1653 1650 1654 1651 // set only links to child (not from child to parent, maybe not wished!!) … … 1666 1663 { 1667 1664 ViewCellInterior *vc = new ViewCellInterior(); 1668 1669 1665 ViewCellContainer::const_iterator it, it_end = children.end(); 1670 1666 1671 1667 for (it = children.begin(); it != it_end; ++ it) 1672 1668 { 1673 // merge pvs1674 vc->GetPvs().Merge((*it)->GetPvs());1669 vc->GetPvs().MergeInPlace((*it)->GetPvs()); 1670 1675 1671 vc->mChildren.push_back(*it); 1676 1672 } … … 2399 2395 ViewCellContainer::const_iterator it = viewCells.begin(), it_end = viewCells.end(); 2400 2396 2401 int i; 2402 for (i=0; it != it_end; ++ it, ++ i) { 2397 for (; it != it_end; ++ it) 2398 { 2399 ObjectPvs interPvs; 2403 2400 //cout<<"v"<<i<<" pvs="<<(*it)->GetPvs().mEntries.size()<<endl; 2404 pvs.Merge((*it)->GetPvs()); 2401 ObjectPvs::Merge(interPvs, pvs, (*it)->GetPvs()); 2402 2403 pvs = interPvs; 2405 2404 } 2406 } else { 2405 } else 2406 { 2407 2407 PrVs prvs; 2408 2408 AxisAlignedBox3 box = GetViewCellBox(viewCell); … … 2413 2413 DeleteLocalMergeTree(prvs.mViewCell); 2414 2414 } 2415 } else 2415 } 2416 else 2417 { 2416 2418 pvs = viewCell->GetPvs(); 2419 } 2417 2420 2418 2421 if (spatialFilterSize >=0.0f) … … 2479 2482 for (oi = pvs.mEntries.begin(); oi != pvs.mEntries.end(); ++ oi) 2480 2483 { 2481 Intersectable *object = (*oi). first;2484 Intersectable *object = (*oi).mObject; 2482 2485 object->Mail(); 2483 2486 } … … 2487 2490 // now go through the pvs again 2488 2491 for (oi = pvs.mEntries.begin(); oi != pvs.mEntries.end(); ++oi) { 2489 Intersectable *object = (*oi). first;2492 Intersectable *object = (*oi).mObject; 2490 2493 2491 2494 // Vector3 center = object->GetBox().Center(); … … 2511 2514 } 2512 2515 // cout<<"nPvs size = "<<nPvsSize<<endl; 2513 pvs.Merge(nPvs); 2516 2517 pvs.MergeInPlace(nPvs); 2514 2518 } 2515 2519 … … 2530 2534 // first mark all object from this pvs 2531 2535 for (oi = pvs.mEntries.begin(); oi != pvs.mEntries.end(); ++ oi) { 2532 Intersectable *object = (*oi). first;2536 Intersectable *object = (*oi).mObject; 2533 2537 object->Mail(); 2534 2538 } … … 2551 2555 float sumRadius = 0.0f; 2552 2556 for (oi = pvs.mEntries.begin(); oi != pvs.mEntries.end(); ++oi, pvsSize++) { 2553 Intersectable *object = (*oi). first;2557 Intersectable *object = (*oi).mObject; 2554 2558 // compute filter size based on the distance and the numebr of samples 2555 2559 AxisAlignedBox3 box = object->GetBox(); … … 2558 2562 float globalRadius = distance*globalC; 2559 2563 2560 int objectSamples = (int)(*oi). second.mSumPdf;2564 int objectSamples = (int)(*oi).mData.mSumPdf; 2561 2565 float localRadius = MAX_FLOAT; 2562 2566 … … 2591 2595 if ((*it) != viewCell) { 2592 2596 //cout<<"v"<<i<<" pvs="<<(*it)->GetPvs().mEntries.size()<<endl; 2593 pvs.Merge((*it)->GetPvs());2597 pvs.MergeInPlace((*it)->GetPvs()); 2594 2598 } 2595 2599 … … 2602 2606 2603 2607 for (oi = pvs.mEntries.begin(); oi != pvs.mEntries.end(); ++oi) { 2604 Intersectable *object = (*oi). first;2608 Intersectable *object = (*oi).mObject; 2605 2609 // compute filter size based on the distance and the numebr of samples 2606 2610 AxisAlignedBox3 box = object->GetBox(); … … 2610 2614 2611 2615 2612 int objectSamples = (int)(*oi). second.mSumPdf;2616 int objectSamples = (int)(*oi).mData.mSumPdf; 2613 2617 float localRadius = MAX_FLOAT; 2614 2618 if (objectSamples > MIN_LOCAL_SAMPLES) … … 2639 2643 } 2640 2644 cout<<"nPvs size = "<<nPvsSize<<endl; 2641 pvs.Merge(nPvs); 2645 2646 pvs.MergeInPlace(nPvs); 2647 2642 2648 Intersectable::NewMail(); 2643 2649 } … … 2784 2790 for (pit = (*oit).mEntries.begin(); pit != pit_end; ++ pit) 2785 2791 { 2786 Intersectable *intersect = (*pit). first;2792 Intersectable *intersect = (*pit).mObject; 2787 2793 2788 2794 if (!intersect->Mailed()) 2789 2795 { 2790 pvs.AddSample(intersect, (*pit). second.mSumPdf);2796 pvs.AddSample(intersect, (*pit).mData.mSumPdf); 2791 2797 intersect->Mail(); 2792 2798 } … … 3273 3279 for (oit = pvs.mEntries.begin(); oit != oit_end; ++ oit) 3274 3280 { 3275 Intersectable *intersect = (*oit). first;3281 Intersectable *intersect = (*oit).mObject; 3276 3282 3277 3283 if (!intersect->Mailed()) … … 3773 3779 for (it = vc->GetPvs().mEntries.begin(); it != it_end; ++ it) 3774 3780 { 3775 Intersectable *intersect = (*it). first;3781 Intersectable *intersect = (*it).mObject; 3776 3782 if (!intersect->Mailed()) 3777 3783 { … … 4622 4628 for (oit = pvs.mEntries.begin(); oit != oit_end; ++ oit) 4623 4629 { 4624 Intersectable *intersect = (*oit). first;4630 Intersectable *intersect = (*oit).mObject; 4625 4631 4626 4632 if (!intersect->Mailed()) … … 4745 4751 else 4746 4752 { 4747 (*it).second.Merge (sample.mPvs);4753 (*it).second.MergeInPlace(sample.mPvs); 4748 4754 } 4749 4755 } … … 4980 4986 4981 4987 4988 VspOspViewCellsManager::VspOspViewCellsManager(ViewCellsTree *vcTree, const string &hierarchyType) 4989 : ViewCellsManager(vcTree) 4990 { 4991 Environment::GetSingleton()->GetIntValue("Hierarchy.Construction.samples", mInitialSamples); 4992 4993 mHierarchyManager = CreateHierarchyManager(hierarchyType); 4994 mHierarchyManager->SetViewCellsManager(this); 4995 mHierarchyManager->SetViewCellsTree(mViewCellsTree); 4996 } 4997 4998 4982 4999 VspOspViewCellsManager::VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm) 4983 5000 : ViewCellsManager(vcTree), mHierarchyManager(hm) … … 4990 5007 4991 5008 5009 HierarchyManager *VspOspViewCellsManager::CreateHierarchyManager(const string &hierarchyType) 5010 { 5011 HierarchyManager *hierarchyManager; 5012 5013 if (strcmp(hierarchyType.c_str(), "osp") == 0) 5014 { 5015 Debug << "hierarchy manager: osp" << endl; 5016 hierarchyManager = new HierarchyManager(HierarchyManager::KD_BASED_OBJ_SUBDIV); 5017 } 5018 else if (strcmp(hierarchyType.c_str(), "bvh") == 0) 5019 { 5020 Debug << "hierarchy manager: bvh" << endl; 5021 hierarchyManager = new HierarchyManager(HierarchyManager::BV_BASED_OBJ_SUBDIV); 5022 } 5023 else // only view space partition 5024 { 5025 Debug << "hierarchy manager: obj" << endl; 5026 hierarchyManager = new HierarchyManager(HierarchyManager::NO_OBJ_SUBDIV); 5027 } 5028 5029 return hierarchyManager; 5030 } 5031 5032 4992 5033 VspOspViewCellsManager::~VspOspViewCellsManager() 4993 5034 { 5035 DEL_PTR(mHierarchyManager); 4994 5036 } 4995 5037 … … 5453 5495 for (oit = pvs.mEntries.begin(); oit != oit_end; ++ oit) 5454 5496 { 5455 Intersectable *intersect = (*oit). first;5497 Intersectable *intersect = (*oit).mObject; 5456 5498 if (!intersect->Mailed()) 5457 5499 { -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1737 r1740 1047 1047 class VspOspViewCellsManager: public ViewCellsManager 1048 1048 { 1049 1049 friend class ViewCellsParseHandlers; 1050 1050 public: 1051 1051 1052 VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm);1052 VspOspViewCellsManager(ViewCellsTree *vcTree, const string &hierarchyType); 1053 1053 1054 1054 ~VspOspViewCellsManager(); … … 1120 1120 protected: 1121 1121 1122 VspOspViewCellsManager(ViewCellsTree *vcTree, HierarchyManager *hm); 1123 1122 1124 #if 1//TEST_EVALUATION 1123 1125 virtual void EvalViewCellPartition(); … … 1148 1150 void ExportPvs(const ObjectContainer &objects, const VssRayContainer &rays); 1149 1151 1152 /** Returns a hierarchy manager of the given name. 1153 */ 1154 static HierarchyManager *CreateHierarchyManager(const string &name); 1155 1150 1156 //void ExportStats(const string &mergeStats); 1151 1157
Note: See TracChangeset
for help on using the changeset viewer.