From 231b4c75648bcd9c509b78a2b8322784e4fbc368 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 20 Mar 2004 17:21:53 +0000 Subject: [PATCH] From Paul Martz, code change to make the flt loader pass its light point intensity value in to osgSim::LightPoint. --- src/osgPlugins/flt/Pool.h | 2 +- src/osgPlugins/flt/flt2osg.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osgPlugins/flt/Pool.h b/src/osgPlugins/flt/Pool.h index 76a9fbb81..56ce21c7d 100644 --- a/src/osgPlugins/flt/Pool.h +++ b/src/osgPlugins/flt/Pool.h @@ -161,7 +161,7 @@ public: struct PoolLtPtAppearance : public osg::Referenced { unsigned int _iBackColorIdx; - float _bIntensity; + float _sfIntensity; float _sfMinPixelSize; float _sfMaxPixelSize; float _sfActualSize; diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index 9a4051950..84661afc3 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -753,7 +753,7 @@ void ConvertFromFLT::visitLtPtAppearancePalette(osg::Group& osgParent, LtPtAppea LtPtAppearancePool::PoolLtPtAppearance* entry = new LtPtAppearancePool::PoolLtPtAppearance; entry->_iBackColorIdx = ltPtApp->backColor; - entry->_bIntensity = ltPtApp->intensity; + entry->_sfIntensity = ltPtApp->intensity; entry->_sfMinPixelSize = ltPtApp->minPixelSize; entry->_sfMaxPixelSize = ltPtApp->maxPixelSize; entry->_sfActualSize = ltPtApp->actualSize; @@ -2186,7 +2186,7 @@ void ConvertFromFLT::visitLightPoint(osg::Group& osgParent, LightPointRecord* re osg::Vec4 color( 1.0f, 1.0f, 1.0f, 1.0f); if( nl < colors.size()) color = colors[nl]; - osgSim::LightPoint lp( true, coords[ nl], color, 1.0f, pointRadius); + osgSim::LightPoint lp( true, coords[ nl], color, pSLightPoint->sfIntensityFront, pointRadius); if( pSLightPoint->diDirection ) { @@ -2303,7 +2303,7 @@ void ConvertFromFLT::visitLightPointIndex(osg::Group& osgParent, LightPointIndex color = pColorPool->getColor( ltPtApp->_iBackColorIdx ); } - osgSim::LightPoint lp( true, coords[nl], color, 1.0f, pointRadius); + osgSim::LightPoint lp( true, coords[nl], color, ltPtApp->_sfIntensity, pointRadius); if (directional) {