Changeset 297 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
- Timestamp:
- 09/26/05 02:00:42 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r296 r297 162 162 class BspInterior : public BspNode 163 163 { 164 friend BspTree; 164 165 public: 165 166 /** Standard contructor taking split plane as argument. … … 275 276 276 277 /** Default constructor creating an empty tree. 278 @param viewCell view cell corresponding to unbounded space 277 279 */ 278 BspTree( );280 BspTree(ViewCell *viewCell); 279 281 280 282 ~BspTree(); … … 427 429 inline int GetNextCandidateIdx(const int max) const; 428 430 431 /** Helper function which extracts a view cell on the front and the back 432 of the split plane. 433 @param backViewCell returns view cell on the back of the split plane 434 @param frontViewCell returns a view cell on the front of the split plane 435 @param coincident container of polygons coincident to the split plane 436 @param splitPlane the split plane which decides about back and front 437 @param extractFront if a front view cell is extracted 438 @param extractBack if a back view cell is extracted 439 */ 440 void ExtractViewCells(ViewCell **backViewCell, 441 ViewCell **frontViewCell, 442 const PolygonContainer &coincident, 443 const Plane3 splitPlane, 444 const bool extractFront, 445 const bool extractBack) const; 446 429 447 /// Pointer to the root of the tree 430 448 BspNode *mRoot; … … 436 454 437 455 /// Strategies for choosing next split plane. 438 enum {NEXT_POLYGON = 0, 439 LEAST_SPLITS = 2, 440 BALANCED_TREE = 4, 441 VERTICAL_AXIS = 8, 442 AXIS_ALIGNED = 16}; 456 enum {NO_STRATEGY = 0, 457 NEXT_POLYGON = 1, 458 AXIS_ALIGNED = 2, 459 LEAST_SPLITS = 4, 460 BALANCED_POLYS = 8, 461 BALANCED_VIEW_CELLS = 16, 462 LARGEST_POLY_AREA = 32, 463 VERTICAL_AXIS = 64 464 }; 443 465 444 466 /// box around the whole view domain … … 448 470 bool mStorePolys; 449 471 450 /// v ertical axis of scene451 V ector3 mVerticalAxis;472 /// view cell corresponding to unbounded space 473 ViewCell *mViewCell; 452 474 453 475 public: … … 465 487 /// BSP tree construction method 466 488 static int sConstructionMethod; 467 489 /// maximal number of polygons where we do axis aligned splits 490 static int sTermMaxPolysForAxisAligned; 491 492 // factors to guid the split plane heuristics 468 493 static float sLeastSplitsFactor; 469 static float sBalancedTreeFactor; 470 static float sVerticalFactor; 471 494 static float sBalancedPolysFactor; 495 static float sBalancedViewCellsFactor; 496 static float sVerticalSplitsFactor; 497 472 498 private: 473 499 /** Evaluates split plane classification with respect to the plane's … … 478 504 contribution for a minimum number splits in the tree. 479 505 */ 480 static float sBalanced TreeTable[4];506 static float sBalancedPolysTable[4]; 481 507 }; 482 508
Note: See TracChangeset
for help on using the changeset viewer.