Changeset 469 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
- Timestamp:
- 12/16/05 18:52:33 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
r463 r469 7 7 #include "Statistics.h" 8 8 //namespace GtpVisibilityPreprocessor { 9 9 10 struct Triangle3; 11 10 12 class BspInterior; 11 13 class BspPvs; 12 struct Triangle3;13 14 class BspLeaf; 14 15 class VspKdTree; 15 16 class VspKdLeaf; 16 17 class KdLeaf; 17 18 18 19 /** … … 28 29 ViewCell(Mesh *mesh); 29 30 30 31 /** Default destructor. 32 */ 31 33 virtual ~ViewCell() {} 32 34 /** Returns Pvs. 33 35 */ 34 const ViewCellPvs &GetPvs() const;35 ViewCellPvs &GetPvs();36 const ObjectPvs &GetPvs() const; 37 ObjectPvs &GetPvs(); 36 38 37 39 int Type() const; … … 41 43 void AddPassingRay(const Ray &ray, const int contributions); 42 44 45 /** Returns volume of the view cell. 46 */ 47 virtual float GetVolume() const; 48 49 /** Sets volume of the view cell. 50 */ 51 void SetVolume(float size); 43 52 44 53 /// Ray set description of the rays passing through this node. … … 51 60 52 61 /// the potentially visible objects 53 ViewCellPvs mPvs; 62 ObjectPvs mPvs; 63 64 float mVolume; 54 65 }; 55 66 56 class BspViewCell: public ViewCell 67 /** 68 View cell belonging to a hierarchy. 69 */ 70 template<typename T> 71 class HierarchyViewCell: public ViewCell 72 { 73 public: 74 HierarchyViewCell<T>(): mLeaves(0) {} 75 HierarchyViewCell<T>(Mesh *mesh): 76 ViewCell(mesh), mLeaves(0) {} 77 78 /// Leaves of the hierarchy which are part of this view cell. 79 std::vector<T> mLeaves; 80 }; 81 82 typedef HierarchyViewCell<BspLeaf *> BspViewCell; 83 typedef HierarchyViewCell<KdLeaf *> KdViewCell; 84 typedef HierarchyViewCell<VspKdLeaf *> VspKdViewCell; 85 86 /*class BspViewCell: public ViewCell 57 87 { 58 88 public: 59 89 BspViewCell(): mBspLeaves(0) {} 60 90 BspViewCell(Mesh *mesh): 61 ViewCell(mesh), mBspLeaves(0) {}91 ViewCell(mesh), mBspLeaves(0) {} 62 92 63 /// Leaves which holdthis view cell.64 vector<BspLeaf *> mBspLeaves;93 /// Leaves of the hierarchy which are part of this view cell. 94 std::vector<BspLeaf *> mBspLeaves; 65 95 }; 66 67 class VspKdViewCell: public ViewCell96 */ 97 /*class VspKdViewCell: public ViewCell 68 98 { 69 99 public: 70 VspKdViewCell(): m VspKdLeaves(0) {}100 VspKdViewCell(): mLeaves(0) {} 71 101 VspKdViewCell(Mesh *mesh): 72 ViewCell(mesh), mVspKdLeaves(0) {}102 ViewCell(mesh), mLeaves(0) {} 73 103 74 float GetSize() {return mSize;} 75 void SetSize(float size) {mSize = size;} 76 77 /// Leaves which hold this view cell. 78 vector<VspKdLeaf *> mVspKdLeaves; 79 80 protected: 81 float mSize; 104 /// Leaves of the hierarchy which are part of this view cell. 105 std::vector<VspKdLeaf *> mLeaves; 82 106 }; 83 107 */ 84 108 class ViewCellsStatistics: public StatisticsBase 85 109 {
Note: See TracChangeset
for help on using the changeset viewer.