Changeset 448 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
- Timestamp:
- 12/05/05 04:42:54 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r444 r448 7 7 #include <stack> 8 8 #include "Statistics.h" 9 #include "VssRay.h" 10 9 11 10 12 class ViewCell; … … 27 29 float GetArea() const; 28 30 29 /** Computes new cell based on the old cell definition and a new split plane30 @param side indicates which side of the halfspace31 */ 32 void SplitGeometry(BspNodeGeometry &front, 31 /** Computes new front and back geometry based on the old cell 32 geometry and a new split plane 33 */ 34 void SplitGeometry(BspNodeGeometry &front, 33 35 BspNodeGeometry &back, 34 const BspTree &tree, 35 const Plane3 &splitPlane) const; 36 37 Polygon3 *SplitPolygon(Polygon3 *poly, const BspTree &tree) const; 36 const Plane3 &splitPlane, 37 const AxisAlignedBox3 &box, 38 const float epsilon) const; 39 40 Polygon3 *SplitPolygon(Polygon3 *poly, const float epsilon) const; 38 41 39 42 PolygonContainer mPolys; … … 270 273 BspNode *GetFront(); 271 274 272 Plane3 *GetPlane(); 273 275 /** Returns split plane. 276 */ 277 Plane3 GetPlane() const; 278 279 /** Replace front or back child with new child. 280 */ 274 281 void ReplaceChildLink(BspNode *oldChild, BspNode *newChild); 282 /** Replace front and back child. 283 */ 275 284 void SetupChildLinks(BspNode *b, BspNode *f); 276 277 /** Splits polygons with respect to the split plane.278 @param polys the polygons to be split. the polygons are consumed and279 distributed to the containers frontPolys, backPolys, coincident.280 @param frontPolys returns the polygons in the front of the split plane281 @param backPolys returns the polygons in the back of the split plane282 @param coincident returns the polygons coincident to the split plane283 284 @returns the number of splits285 */286 int SplitPolygons(PolygonContainer &polys,287 PolygonContainer &frontPolys,288 PolygonContainer &backPolys,289 PolygonContainer &coincident);290 285 291 286 friend ostream &operator<<(ostream &s, const BspInterior &A) … … 298 293 /// Splitting plane corresponding to this node 299 294 Plane3 mPlane; 295 300 296 /// back node 301 297 BspNode *mBack; … … 328 324 void SetViewCell(BspViewCell *viewCell); 329 325 330 /** Adds ray sample contributions to the PVS. 331 @param sampleContributions the number contributions of the samples 332 @param contributingSampels the number of contributing rays 333 334 */ 335 void AddToPvs(const BoundedRayContainer &rays, 336 int &sampleContributions, 337 int &contributingSamples); 326 VssRayContainer mVssRays; 338 327 339 328 protected: … … 516 505 BspViewCell *GetRootCell() const; 517 506 518 /** Parses the environment and stores the global BSP tree parameters 519 */ 520 static void ParseEnvironment(); 521 507 /** Returns epsilon of this tree. 508 */ 509 float GetEpsilon() const; 522 510 523 511 protected: … … 722 710 bool SelectAxisAlignedPlane(Plane3 &plane, const PolygonContainer &polys) const; 723 711 724 /** Bounds ray and returns minT and maxT.725 @returns true if ray hits BSP tree bounding box726 */727 bool BoundRay(const Ray &ray, float &minT, float &maxT) const;728 729 712 /** Subdivides the rays into front and back rays according to the split plane. 730 713 … … 768 751 */ 769 752 float AccumulatedRayLength(BoundedRayContainer &rays) const; 753 754 /** Splits polygons with respect to the split plane. 755 @param polys the polygons to be split. the polygons are consumed and 756 distributed to the containers frontPolys, backPolys, coincident. 757 @param frontPolys returns the polygons in the front of the split plane 758 @param backPolys returns the polygons in the back of the split plane 759 @param coincident returns the polygons coincident to the split plane 760 761 @returns the number of splits 762 */ 763 int SplitPolygons(const Plane3 &plane, 764 PolygonContainer &polys, 765 PolygonContainer &frontPolys, 766 PolygonContainer &backPolys, 767 PolygonContainer &coincident) const; 768 769 /** Adds ray sample contributions to the PVS. 770 @param sampleContributions the number contributions of the samples 771 @param contributingSampels the number of contributing rays 772 773 */ 774 void AddToPvs(BspLeaf *leaf, 775 const BoundedRayContainer &rays, 776 int &sampleContributions, 777 int &contributingSamples); 770 778 771 779 /// Pointer to the root of the tree. … … 852 860 bool mPvsUseArea; 853 861 862 /// epsilon where two points are still considered equal 863 float mEpsilon; 864 854 865 private: 855 866
Note: See TracChangeset
for help on using the changeset viewer.