Show
Ignore:
Timestamp:
04/02/03 12:50:15 (11 years ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osglightpoint/osglightpoint.cpp

    r1747 r1791  
    66#include <osg/Geode> 
    77#include <osg/Group> 
     8#include <osg/ShapeDrawable> 
    89#include <osg/Notify> 
    910 
     
    3334    float rdelta = 1.0f/((float)noSteps-1.0f); 
    3435     
    35     lpn._lightPointList.reserve(noSteps); 
     36    lpn.getLightPointList().reserve(noSteps); 
    3637     
    3738    for(unsigned int i=0;i<noSteps;++i,rend+=rdelta) 
     
    4344        INTERPOLATE(_color); 
    4445        INTERPOLATE(_radius); 
    45         //INTERPOLATE(_minPixelSize); 
    46         //INTERPOLATE(_maxPixelSize); 
    47 //        INTERPOLATE(_maxVisibileDistance2); 
    4846 
    4947        lpn.addLightPoint(lp); 
     
    157155    rootnode->addChild(osgDB::readNodeFiles(arguments)); 
    158156    rootnode->addChild(createLightPointsDatabase()); 
    159     if (!rootnode) 
    160     { 
    161         return 1; 
    162     } 
     157     
    163158     
    164159    // run optimization over the scene graph