2001-10-22 05:27:40 +08:00
|
|
|
#include <osg/LightSource>
|
2001-01-11 00:32:10 +08:00
|
|
|
|
|
|
|
using namespace osg;
|
|
|
|
|
|
|
|
LightSource::LightSource()
|
|
|
|
{
|
2002-04-11 05:51:34 +08:00
|
|
|
// switch off culling of light source nodes by default.
|
|
|
|
setCullingActive(false);
|
2001-01-11 00:32:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LightSource::~LightSource()
|
|
|
|
{
|
|
|
|
// ref_ptr<> automactially decrements the reference count of attached lights.
|
|
|
|
}
|
|
|
|
|
2001-09-20 05:08:56 +08:00
|
|
|
const bool LightSource::computeBound() const
|
2001-01-11 00:32:10 +08:00
|
|
|
{
|
|
|
|
// 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();
|
2001-09-20 05:08:56 +08:00
|
|
|
|
2001-01-11 00:32:10 +08:00
|
|
|
_bsphere_computed = true;
|
|
|
|
|
2001-09-20 05:08:56 +08:00
|
|
|
return true;
|
2001-01-11 00:32:10 +08:00
|
|
|
}
|