Added support for min pixel size, max pixel size and max visable distance to

osgSim::LightPointNode, the max pixel size from was originally in osg::LightPoint.

Added additional get/set methods to osg::LightPointNode.

Increased the compute pixel size by a ratio 1.41 (sqrtf(2)) to correlate the
computed size with the actual size seen on screen.
This commit is contained in:
Robert Osfield
2003-04-02 10:50:15 +00:00
parent d3d32edfcd
commit 7aab621405
7 changed files with 62 additions and 39 deletions

View File

@@ -96,11 +96,11 @@ void CullStack::pushCullingSet()
float P23 = P(2,3);
float P33 = P(3,3);
osg::Vec4 pixelSizeVector(M(0,2)*P23,
M(1,2)*P23,
M(2,2)*P23,
M(3,2)*P23 + M(3,3)*P33);
M(1,2)*P23,
M(2,2)*P23,
M(3,2)*P23 + M(3,3)*P33);
float scaleRatio = 1.0f/sqrtf(scale_00.length2()+scale_10.length2());
float scaleRatio = 0.701f/sqrtf(scale_00.length2()+scale_10.length2());
pixelSizeVector *= scaleRatio;