360247225e
osg::Drawable. Added osg::Image::readPixels to osg::Image. Made osg::LightSource to default to cullActive set to false to that LightSource nodes don't get culled by default.
27 lines
542 B
C++
27 lines
542 B
C++
#include <osg/LightSource>
|
|
|
|
using namespace osg;
|
|
|
|
LightSource::LightSource()
|
|
{
|
|
// switch off culling of light source nodes by default.
|
|
setCullingActive(false);
|
|
}
|
|
|
|
|
|
LightSource::~LightSource()
|
|
{
|
|
// ref_ptr<> automactially decrements the reference count of attached lights.
|
|
}
|
|
|
|
const bool LightSource::computeBound() const
|
|
{
|
|
// note, don't do anything right now as the light itself is not
|
|
// visualised, just having an effect on the lighting of geodes.
|
|
_bsphere.init();
|
|
|
|
_bsphere_computed = true;
|
|
|
|
return true;
|
|
}
|