Changeset 441 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
- Timestamp:
- 12/01/05 18:50:06 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r440 r441 364 364 /// rays piercing this node 365 365 BoundedRayContainer *mRays; 366 /// area of current node 367 float mArea; 368 BspNodeGeometry *mGeometry; 369 366 370 367 /// pvs size 371 368 int mPvs; … … 385 382 mViewCell(NULL), 386 383 mRays(NULL), 387 mPvs(0), 388 mArea(0.0), 389 mGeometry(NULL) 384 mPvs(0) 390 385 {} 391 386 … … 395 390 ViewCell *viewCell, 396 391 BoundedRayContainer *rays, 397 int pvs, 398 float area, 399 BspNodeGeometry *cell): 392 int pvs): 400 393 mNode(node), 401 394 mPolygons(polys), … … 403 396 mViewCell(viewCell), 404 397 mRays(rays), 405 mPvs(pvs), 406 mArea(area), 407 mGeometry(cell) 398 mPvs(pvs) 408 399 {} 409 400 }; … … 412 403 413 404 /** Default constructor creating an empty tree. 414 @param viewCell view cell corresponding to unbounded space415 405 */ 416 BspTree( BspViewCell *viewCell);417 406 BspTree(); 407 418 408 ~BspTree(); 419 409 410 420 411 const BspTreeStatistics &GetStatistics() const; 421 412 … … 506 497 BspLeaf *GetRandomLeaf(const bool onlyUnmailed = false); 507 498 508 /** Returns true if merge criteria are reached.509 */510 bool ShouldMerge(BspLeaf *front, BspLeaf *back) const;511 512 /** Merges view cells based on some criteria513 E.g., empty view cells can pe purged, view cells which have514 a very similar PVS can be merged to one larger view cell.515 516 @returns true if merge was successful.517 */518 bool MergeViewCells(BspLeaf *front, BspLeaf *back) const;519 520 499 /** Traverses tree and counts all view cells as well as their PVS size. 521 500 */ 522 501 void EvaluateViewCellsStats(BspViewCellsStatistics &stat) const; 502 503 /** Returns view cell corresponding to unbounded space. 504 */ 505 BspViewCell *GetRootCell() const; 523 506 524 507 /** Parses the environment and stores the global BSP tree parameters … … 601 584 float SplitPlaneCost(const Plane3 &candidatePlane, 602 585 const BoundedRayContainer &rays, 603 const int pvs, 604 const float area, 605 const BspNodeGeometry &cell) const; 586 const int pvs) const; 606 587 607 588 /** Filters next view cell down the tree and inserts it into the appropriate leaves … … 834 815 /// number of candidates for split planes evaluated using the rays 835 816 int mMaxRayCandidates; 836 817 /// maximum tests for split plane evaluation with a single candidate 818 int mMaxTests; 819 837 820 float mCtDivCi; 838 821 … … 856 839 float mBalancedViewCellsFactor; 857 840 858 //-- thresholds used for view cells merge859 int mMinPvsDif;860 int mMinPvs;861 int mMaxPvs;862 841 /// if area or accumulated ray lenght should be used for PVS heuristics 863 bool mPvsUse Area;842 bool mPvsUseLen; 864 843 865 844 private:
Note: See TracChangeset
for help on using the changeset viewer.