Changeset 346
- Timestamp:
- 10/21/06 14:06:57 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGScreenLOD.inl
r325 r346 52 52 53 53 Int32 index = 0; 54 54 55 if(numLevels > 1) 55 56 { … … 97 98 min[0] = osgClamp(-1.f, min[0], 1.f); 98 99 min[1] = osgClamp(-1.f, min[1], 1.f); 99 //std::cout << min << std::endl;100 //std::cout << max << std::endl;101 //v.transform(worldToCam);102 103 //Real32 pix = (max[0] - min[0]) * (max[1] - min[1]) * ((pix_width/2.0f)*(pix_height/2.0f));104 //Real32 cbb = pix / (pix_width * pix_height);105 100 106 101 // cbb is the percent of the screen real estate this would cover … … 108 103 Real32 pix = cbb * vp->getPixelWidth() * vp->getPixelHeight(); 109 104 110 //std::cout << pix << std::endl; 111 //Make a choice based on pixels 112 if(pix < 1500) 105 //Make a choice based on percentage of pixels 106 if(cbb < 0.05) 113 107 index++; 114 else if(pix < 500) 108 else if(cbb < 0.01) 109 index++; 110 else if(cbb < 0.001) 115 111 index++; 116 112 else if(pix < 50) … … 118 114 else if(pix < 5) 119 115 index=numLevels-1; 116 117 if (index >= numLevels) 118 index=numLevels-1; 120 119 } 121 122 if (index >= numLevels)123 index=numLevels-1;124 120 125 121 ra->useNodeList();
