Changeset 1624 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
- Timestamp:
- 10/16/06 07:58:19 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1614 r1624 50 50 public: 51 51 /// total number of entries in the pvs 52 int pvsEntries;52 int mPvsEntries; 53 53 /// storage cost 54 int m emory;54 int mMemory; 55 55 /// total number of nodes 56 int nodes;56 int mNodes; 57 57 /// maximal reached depth 58 int m axDepth;58 int mMaxDepth; 59 59 /// accumulated depth 60 int accumDepth;60 int mAccumDepth; 61 61 /// time spent for queue repair 62 float repairTime; 62 float mRepairTime; 63 63 64 // global cost ratio violations 64 65 int mGlobalCostMisses; 66 /// total cost of subdivision 67 float mTotalCost; 68 /// render cost decrease of subdivision 69 float mRenderCostDecrease; 65 70 66 71 // Constructor … … 70 75 } 71 76 72 int Nodes() const {return nodes;}73 int Interior() const { return nodes / 2; }74 int Leaves() const { return ( nodes / 2) + 1; }77 int Nodes() const {return mNodes;} 78 int Interior() const { return mNodes / 2; } 79 int Leaves() const { return (mNodes / 2) + 1; } 75 80 76 81 // TODO: computation wrong 77 double AvgDepth() const { return accumDepth / (double)Leaves();}82 double AvgDepth() const { return mAccumDepth / (double)Leaves();} 78 83 79 84 void Reset() 80 85 { 81 86 mGlobalCostMisses = 0; 82 nodes = 0; 83 maxDepth = 0; 84 accumDepth = 0; 85 repairTime = 0; 86 memory = 0; 87 pvsEntries = 0; 87 mTotalCost = 0; 88 mRenderCostDecrease = 0; 89 90 mNodes = 0; 91 mMaxDepth = 0; 92 mAccumDepth = 0; 93 mRepairTime = 0; 94 mMemory = 0; 95 mPvsEntries = 0; 88 96 } 89 97 … … 201 209 */ 202 210 //AxisAlignedBox3 GetViewSpaceBox() const; 211 203 212 /** Returns object space bounding box. 204 213 */ … … 257 266 /** Repairs the dirty entries of the candidate queue. 258 267 */ 259 void RepairQueue(); 260 261 /** Collect the list of dirty candidates after the current subdivision candidate 262 split. 263 */ 264 void CollectDirtyCandidates(vector<SubdivisionCandidate *> &dirtyList); 268 void RepairQueue(SubdivisionCandidate *sc); 269 270 /** Collect the list of dirty candidates after the current 271 subdivision candidate split. 272 */ 273 void CollectDirtyCandidates( 274 SubdivisionCandidate *sc, 275 vector<SubdivisionCandidate *> &dirtyList); 265 276 266 277 /** Evaluate subdivision stats for log. 267 278 */ 268 void EvalSubdivisionStats( const float renderCostDecr);279 void EvalSubdivisionStats(); 269 280 270 281 void AddSubdivisionStats( … … 274 285 const int totalPvsEntries); 275 286 276 void CollectObjectSpaceDirtyList(); 277 void CollectViewSpaceDirtyList(); 278 279 bool AddSampleToPvs(Intersectable *obj, 280 const float pdf, 281 float &contribution) const; 282 283 void CollectViewSpaceDirtyList(SubdivisionCandidateContainer &dirtyList); 284 void CollectObjectSpaceDirtyList(SubdivisionCandidateContainer &dirtyList); 287 bool AddSampleToPvs( 288 Intersectable *obj, 289 const float pdf, 290 float &contribution) const; 291 292 void CollectViewSpaceDirtyList( 293 SubdivisionCandidate *sc, 294 SubdivisionCandidateContainer &dirtyList); 295 296 void CollectObjectSpaceDirtyList( 297 SubdivisionCandidate *sc, 298 SubdivisionCandidateContainer &dirtyList); 285 299 286 void ExportOspTree(Exporter *exporter, const ObjectContainer &objects) const; 300 void ExportOspTree( 301 Exporter *exporter, 302 const ObjectContainer &objects) const; 287 303 288 304 void ParseEnvironment(); … … 313 329 314 330 void ConstructInterleaved( 331 const VssRayContainer &sampleRays, 332 const ObjectContainer &objects, 333 AxisAlignedBox3 *forcedViewSpace); 334 335 void ConstructInterleaved2( 315 336 const VssRayContainer &sampleRays, 316 337 const ObjectContainer &objects, … … 359 380 int mSavedViewSpaceSubdivisionType; 360 381 /// the current subdivision candidate 361 SubdivisionCandidate *mCurrentCandidate;382 //SubdivisionCandidate *mCurrentCandidate; 362 383 363 384 … … 389 410 390 411 /// keeps track of cost during subdivision 391 float mTotalCost;412 //float mTotalCost; 392 413 /// statistics about the hierarchy 393 414 HierarchyStatistics mHierarchyStats; … … 396 417 int mMinDepthForViewSpaceSubdivion; 397 418 419 int mMinRenderCostDecrease; 420 398 421 ofstream mSubdivisionStats; 399 422
Note: See TracChangeset
for help on using the changeset viewer.