Changeset 1995 for GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
- Timestamp:
- 01/18/07 20:04:20 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
r1989 r1995 1464 1464 nodeStack.push(mRoot); 1465 1465 1466 float area = 0.0f; 1467 float radius = 0.0f; 1468 int nodes = 0; 1469 1466 1470 while (!nodeStack.empty()) { 1467 1471 KdNode *node = nodeStack.top(); … … 1470 1474 node->mPvsTermination = 0; 1471 1475 if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 1476 area += GetSurfaceArea(node); 1477 radius += GetBox(node).Radius(); 1478 nodes++; 1472 1479 node->mPvsTermination = 1; 1473 1480 // create dummy kd intersectable … … 1479 1486 } 1480 1487 } 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 1481 1498 } 1482 1499
Note: See TracChangeset
for help on using the changeset viewer.