Changeset 1329 for GTP/trunk/Lib
- Timestamp:
- 09/11/06 00:45:27 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1323 r1329 221 221 222 222 // start with view space subdivison: prepare vsp tree for traversal 223 PrepareViewSpaceSubdivision(sampleRays, objects, forcedViewSpace); 224 223 if (StartViewSpaceSubdivision()) 224 { 225 mViewSpaceSubdivisionType = mSavedViewSpaceSubdivisionType; 226 PrepareViewSpaceSubdivision(sampleRays, objects, forcedViewSpace); 227 } 228 225 229 // start object space subdivision immediately? 226 230 if (StartObjectSpaceSubdivision()) … … 345 349 return !ObjectSpaceSubdivisionConstructed() && 346 350 (mTQueue.Empty() || ((mConstructionType == INTERLEAVED) && ospDepthReached)); 351 } 352 353 354 bool HierarchyManager::StartViewSpaceSubdivision() const 355 { 356 const bool vspDepthReached = 357 (mMinDepthForObjectSpaceSubdivion <= mVspTree->mVspStats.maxDepth); 358 359 return !ViewSpaceSubdivisionConstructed() && 360 (mTQueue.Empty() || ((mConstructionType == INTERLEAVED) && vspDepthReached)); 347 361 } 348 362 … … 390 404 mObjectSpaceSubdivisionType = mSavedObjectSpaceSubdivisionType; 391 405 392 cout << "starting object space subdivision at maximal view space subdivison depth " << mVspTree->mVspStats.maxDepth << " (" << mMinDepthForObjectSpaceSubdivion << ") " << endl; 406 cout << "starting object space subdivision at depth " 407 << mVspTree->mVspStats.maxDepth << " (" 408 << mMinDepthForObjectSpaceSubdivion << ") " << endl; 409 393 410 PrepareObjectSpaceSubdivision(sampleRays, objects); 411 412 cout << "reseting queue ... "; 413 ResetQueue(); 414 cout << "finished" << endl; 415 } 416 417 if (StartViewSpaceSubdivision()) 418 { 419 mViewSpaceSubdivisionType = mSavedViewSpaceSubdivisionType; 420 421 cout << "starting view space subdivision at depth " 422 << mVspTree->mVspStats.maxDepth << " (" 423 << mMinDepthForObjectSpaceSubdivion << ") " << endl; 424 425 PrepareViewSpaceSubdivision(sampleRays, objects, forcedViewSpace); 394 426 395 427 cout << "reseting queue ... "; … … 422 454 return false; 423 455 } 456 } 457 458 459 bool HierarchyManager::ViewSpaceSubdivisionConstructed() const 460 { 461 return mVspTree && mVspTree->GetRoot(); 424 462 } 425 463 -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1323 r1329 252 252 253 253 bool StartObjectSpaceSubdivision() const; 254 bool StartViewSpaceSubdivision() const; 254 255 255 256 void PrepareViewSpaceSubdivision( 256 257 const VssRayContainer &sampleRays, 257 258 const ObjectContainer &objects, 258 AxisAlignedBox3 *forcedViewSpace );259 AxisAlignedBox3 *forcedViewSpace = NULL); 259 260 260 261 bool ObjectSpaceSubdivisionConstructed() const; 262 bool ViewSpaceSubdivisionConstructed() const; 261 263 262 264 void ResetQueue(); … … 266 268 267 269 enum {SEQUENTIAL, INTERLEAVED}; 270 268 271 int mObjectSpaceSubdivisionType; 272 int mViewSpaceSubdivisionType; 273 269 274 /// the original osp type 270 275 int mSavedObjectSpaceSubdivisionType; 276 int mSavedViewSpaceSubdivisionType; 271 277 272 278 int mConstructionType;
Note: See TracChangeset
for help on using the changeset viewer.