Ignore:
Timestamp:
01/18/07 20:04:20 (17 years ago)
Author:
bittner
Message:

mutation tests

File:
1 edited

Legend:

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

    r1989 r1995  
    14641464  nodeStack.push(mRoot); 
    14651465 
     1466  float area = 0.0f; 
     1467  float radius = 0.0f; 
     1468  int nodes = 0; 
     1469   
    14661470  while (!nodeStack.empty()) { 
    14671471    KdNode *node = nodeStack.top(); 
     
    14701474        node->mPvsTermination = 0; 
    14711475        if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 
     1476          area += GetSurfaceArea(node); 
     1477          radius += GetBox(node).Radius(); 
     1478          nodes++; 
    14721479          node->mPvsTermination = 1; 
    14731480          // create dummy kd intersectable 
     
    14791486    } 
    14801487  } 
     1488 
     1489  if (nodes) { 
     1490        area /= nodes; 
     1491        radius /= nodes; 
     1492        cout<<"Number of nodes for storing in the PVS = "<<nodes<<endl; 
     1493        cout<<"Average rel. node area = "<<area/GetSurfaceArea(mRoot)<<endl; 
     1494        cout<<"Average rel. node radius = "<<radius/GetBox(mRoot).Radius()<<endl; 
     1495        cout<<"Avg node radius = "<<radius<<endl; 
     1496  } 
     1497   
    14811498} 
    14821499 
Note: See TracChangeset for help on using the changeset viewer.