Ignore:
Timestamp:
02/20/06 02:13:08 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r655 r656  
    415415 
    416416// TODO: return memory usage in MB 
    417 float VspBspTree::GetMemUsage(/*const VspBspTraversalQueue &tstack*/) const 
    418 { 
    419         return 
    420                 (sizeof(VspBspTree) + 
    421                  (float)mBspStats.Leaves() * sizeof(BspLeaf) +  
    422                  // the nodes in the stack is the minimal additional number of leaves 
    423                  //(float)tstack.size() * sizeof(BspLeaf) + 
    424                  mBspStats.Interior() * sizeof(BspInterior) + 
    425                  mBspStats.accumRays * sizeof(RayInfo)) / (1024.0f * 1024.0f); 
     417float VspBspTree::GetMemUsage() const 
     418{ 
     419        return (float) 
     420                 (sizeof(VspBspTree) +  
     421                  mBspStats.Leaves() * sizeof(BspLeaf) +  
     422                  mCreatedViewCells * sizeof(BspViewCell) + 
     423                  mBspStats.pvs * sizeof(ObjectPvsData) + 
     424                  mBspStats.Interior() * sizeof(BspInterior) + 
     425                  mBspStats.accumRays * sizeof(RayInfo)) / (1024.0f * 1024.0f); 
    426426} 
    427427 
     
    19941994                mBspStats.maxPvs = data.mPvs; 
    19951995         
     1996        mBspStats.pvs += data.mPvs; 
     1997 
    19961998        if (data.mDepth < mBspStats.minDepth) 
    19971999                mBspStats.minDepth = data.mDepth; 
    1998  
     2000         
    19992001        if (data.mDepth >= mTermMaxDepth) 
    20002002                ++ mBspStats.maxDepthNodes; 
     
    20192021 
    20202022        ++ mCreatedViewCells; 
     2023 
    20212024#ifdef _DEBUG 
    20222025        Debug << "BSP stats: " 
Note: See TracChangeset for help on using the changeset viewer.