Changeset 663 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
- Timestamp:
- 02/27/06 07:58:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
r660 r663 28 28 struct BspRay; 29 29 30 #define OCTREE_HACK 030 //#define OCTREE_HACK 0 31 31 /** 32 32 This is a view space partitioning specialised BSPtree. … … 44 44 /** Additional data which is passed down the BSP tree during traversal. 45 45 */ 46 structVspBspTraversalData46 class VspBspTraversalData 47 47 { 48 public: 48 49 /// the current node 49 50 BspNode *mNode; … … 64 65 /// if this node is a kd-node (i.e., boundaries are axis aligned 65 66 bool mIsKdNode; 66 67 68 #if OCTREE_HACK // OCTREE HACK 67 // hack for octree 69 68 int mAxis; 70 #endif 71 /// bounding box of current view space. 72 ///AxisAlignedBox3 mBbox;73 69 float mPriority; 70 71 static bool sBreathFirstSplits; 72 74 73 /** Returns average ray contribution. 75 74 */ … … 129 128 float GetCost() const 130 129 { 131 #if 1 132 return mPvs * mProbability; 133 #endif 134 #if 0 135 return (float) (-mDepth); // for regular grid 136 #endif 137 #if 0 138 return (float)(mPvs * (int)mRays->size()); 139 #endif 140 #if 0 141 return (float)mPvs; 142 #endif 143 #if 0 144 return mProbabiliy * (float)mRays->size(); 145 #endif 130 if (sBreathFirstSplits) 131 return mPvs * mProbability; 132 else 133 return (float) (-mDepth); // for kd tree 146 134 } 147 135 … … 160 148 }; 161 149 150 162 151 typedef std::priority_queue<VspBspTraversalData> VspBspTraversalQueue; 163 152 … … 788 777 789 778 //int mSplits; 790 779 /// subdivision stats output file 791 780 ofstream mSubdivsionStats; 792 781 /// if random split axis should be used 793 782 bool mUseRandomAxis; 794 783 /// use polygon split whenever there are polys left 795 784 bool mUsePolygonSplitIfAvailable; 796 785 /// current time stamp (used for keeping split history) 797 786 int mTimeStamp; 798 787 /// number of currenly generated view cells 799 788 int mCreatedViewCells; 789 /// if vsp bsp tree should simulate octree 790 bool mSimulateOctree; 791 792 int mBreathFirstSplits; 800 793 801 794 private:
Note: See TracChangeset
for help on using the changeset viewer.