Changeset 547 for trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h
- Timestamp:
- 01/17/06 23:28:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h
r544 r547 52 52 /// rays piercing this node 53 53 RayInfoContainer *mRays; 54 /// area of current node55 float m Area;54 /// the probability that this node contains view point 55 float mProbability; 56 56 /// geometry of node as induced by planes 57 57 BspNodeGeometry *mGeometry; … … 77 77 mRays(NULL), 78 78 mPvs(0), 79 m Area(0.0),79 mProbability(0.0), 80 80 mGeometry(NULL), 81 81 mMaxCostMisses(0) … … 87 87 const int depth, 88 88 RayInfoContainer *rays, 89 int pvs,90 float area,89 const int pvs, 90 const float p, 91 91 BspNodeGeometry *geom): 92 92 mNode(node), … … 95 95 mRays(rays), 96 96 mPvs(pvs), 97 m Area(area),97 mProbability(p), 98 98 mGeometry(geom), 99 99 mMaxCostMisses(0) … … 109 109 mRays(rays), 110 110 mPvs(0), 111 m Area(0),111 mProbability(0), 112 112 mGeometry(geom), 113 113 mMaxCostMisses(0) … … 119 119 { 120 120 #if 1 121 return mPvs * m Area;121 return mPvs * mProbability; 122 122 #endif 123 123 #if 0 … … 128 128 #endif 129 129 #if 0 130 return m Area* (float)mRays->size();130 return mProbabiliy * (float)mRays->size(); 131 131 #endif 132 132 } … … 190 190 @param viewCells returns the view cells 191 191 */ 192 void CollectViewCells(ViewCellContainer &viewCells ) const;192 void CollectViewCells(ViewCellContainer &viewCells, bool onlyValid) const; 193 193 194 194 /** A ray is cast possible intersecting the tree. … … 250 250 /** Merges view cells according to some cost heuristics. 251 251 */ 252 int MergeViewCells(const VssRayContainer &rays );252 int MergeViewCells(const VssRayContainer &rays, const ObjectContainer &objects); 253 253 254 254 /** Refines view cells using shuffling, i.e., border leaves … … 298 298 299 299 void CollectViewCells(BspNode *root, 300 bool onlyValid, 300 301 ViewCellContainer &viewCells, 301 302 bool onlyUnmailed = false) const; 302 303 303 /** returns maximal valid pvs. 304 */ 305 int GetMaxPvs() { return mMaxPvs;} 306 304 307 305 /** Checks validy of view cells. 308 306 if not valid, sets regions invalid and deletes view cell. … … 339 337 }; 340 338 339 /** faster evaluation of split plane cost for kd axis aligned cells. 340 */ 341 341 float EvalAxisAlignedSplitCost(const VspBspTraversalData &data, 342 342 const AxisAlignedBox3 &box, 343 343 const int axis, 344 const float &position) const; 344 const float &position, 345 float &pFront, 346 float &pBack) const; 345 347 346 348 /** Returns view cell corresponding to … … 409 411 BspNodeGeometry &geomFront, 410 412 BspNodeGeometry &geomBack, 411 float & areaFront,412 float & areaBack) const;413 float &pFront, 414 float &pBack) const; 413 415 414 416 /** Subdivide leaf. … … 464 466 BspNodeGeometry **frontGeom, 465 467 BspNodeGeometry **backGeom, 466 float & frontArea,467 float & backArea,468 bool useKdSplit);468 float &pFront, 469 float &pBack, 470 const bool useKdSplit); 469 471 470 472 /** Sorts split candidates for surface area heuristics for axis aligned splits. … … 482 484 const int &axis, 483 485 float &position); 484 485 /** Evaluates cost ratio for axis aligned splits.486 */487 /*float EvalCostRatio(const VspBspTraversalData &tData,488 const AxisAlignedBox3 &box,489 const int axis,490 const float position,491 int &raysBack,492 int &raysFront,493 int &pvsBack,494 int &pvsFront);*/495 486 496 487 /** Selects an axis aligned split plane. … … 606 597 BspViewCell *vc2) const; 607 598 608 /** 609 Checks if this traversal data corresponds to 610 a valid view space region. 611 */ 612 bool CheckValid(const VspBspTraversalData &data) const; 613 599 614 600 /** Propagates valid flag up the tree. 615 601 */ … … 646 632 /// maximal possible depth 647 633 int mTermMaxDepth; 648 /// mininum area649 float mTermMin Area;634 /// mininum probability 635 float mTermMinProbability; 650 636 /// mininum PVS 651 637 int mTermMinPvs; … … 654 640 /// minimal accumulated ray length 655 641 float mTermMinAccRayLength; 642 643 ofstream mStats; 656 644 657 645 //-- termination criteria for axis aligned split … … 686 674 float mPvsFactor; 687 675 688 /// if area or accumulated ray lenghtshould be used for PVS heuristics689 bool m PvsUseArea;676 /// if area or volume should be used for PVS heuristics 677 bool mUseAreaForPvs; 690 678 /// tolerance for polygon split 691 679 float mEpsilon; … … 719 707 bool mUseRaysForMerge; 720 708 721 /// maximal allowed pvs so that view cell is valid722 int mMaxPvs;723 724 float mMaxPvsRatio;725 726 709 /// View cell corresponding to the space outside the valid view space 727 710 BspViewCell *mOutOfBoundsCell; 728 729 /// if invalid space should be shown730 bool mShowInvalidSpace;731 711 732 712 int mCurrentViewCellsId; … … 797 777 /// overall cost used to normalize cost ratio 798 778 static float sOverallCost; 779 // if area or volume should be used for the merge heuristics 780 static bool sUseArea; 799 781 800 782 /** Evaluates the merge costs of the leaves.
Note: See TracChangeset
for help on using the changeset viewer.