Changeset 1345 for GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
- Timestamp:
- 09/12/06 19:30:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r1323 r1345 283 283 public: 284 284 285 struct SortableEntry; 286 typedef vector<SortableEntry> SortableEntryContainer; 287 285 288 /** Additional data which is passed down the BSP tree during traversal. 286 289 */ … … 294 297 mProbability(0.0), 295 298 mMaxCostMisses(0), 296 mPriority(0),297 299 mAxis(0) 300 //mObjectsStart(0), 301 //mObjectsEnd(0) 298 302 {} 299 303 … … 307 311 mProbability(v), 308 312 mMaxCostMisses(0), 309 mPriority(0),310 313 mAxis(0) 314 //mObjectsStart(0) 315 //mObjectsEnd(0) 311 316 {} 312 313 314 /** Returns cost of the traversal data.315 */316 float GetCost() const317 {318 return mPriority;319 }320 317 321 318 /// deletes contents and sets them to NULL … … 337 334 /// current axis 338 335 int mAxis; 339 /// current priority 340 float mPriority; 341 342 343 friend bool operator<(const BvhTraversalData &a, const BvhTraversalData &b) 344 { 345 return a.GetCost() < b.GetCost(); 346 } 336 /// start of objects 337 SortableEntryContainer::const_iterator mObjectsStart; 338 /// end of objects 339 SortableEntryContainer::const_iterator mObjectsEnd; 347 340 }; 348 341 … … 544 537 } 545 538 }; 546 539 547 540 /** Evaluate balanced object partition. 548 541 */ … … 586 579 587 580 /** Subdivides leaf. 588 @param leaf the leaf to be subdivided581 @param sc the subdivisionCandidate holding all necessary data for subdivision 589 582 590 @param polys the polygons to be split 591 @param frontPolys returns the polygons in front of the split plane 592 @param backPolys returns the polygons in the back of the split plane 593 594 @param rays the polygons to be filtered 595 @param frontRays returns the polygons in front of the split plane 596 @param backRays returns the polygons in the back of the split plane 597 598 @returns the root of the subdivision 583 @param frontData returns the traversal data for the front node 584 @param backData returns the traversal data for the back node 585 586 @returns the new interior node = the of the subdivision 599 587 */ 600 588 BvhInterior *SubdivideNode( 601 const ObjectContainer &frontObjects, 602 const ObjectContainer &backObjects, 603 const BvhTraversalData &tData, 589 const BvhSubdivisionCandidate &sc, 604 590 BvhTraversalData &frontData, 605 591 BvhTraversalData &backData); … … 636 622 @param axis the current split axis 637 623 */ 638 void SortSubdivisionCandidates( 639 const BvhTraversalData &data, 624 static void SortSubdivisionCandidates( 625 const ObjectContainer &objects, 626 vector<SortableEntry> **subdivisionCandidates, 640 627 const int axis); 641 628 … … 724 711 protected: 725 712 713 /// pre-sorted subdivision candidtes for all three directions. 714 vector<SortableEntry> *mGlobalSubdivisionCandidates[3]; 715 726 716 /// pointer to the hierarchy of view cells 727 717 ViewCellsTree *mViewCellsTree;
Note: See TracChangeset
for help on using the changeset viewer.