OpenSceneGraph 2.8.3
|
Leaf Node for defining a light in the scene. More...
Public Types | |
enum | ReferenceFrame { RELATIVE_RF, ABSOLUTE_RF } |
Public Member Functions | |
LightSource () | |
LightSource (const LightSource &ls, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Node (osg, LightSource) | |
void | setReferenceFrame (ReferenceFrame rf) |
Set the light sources's ReferenceFrame, either to be relative to its parent reference frame, or relative to an absolute coordinate frame. | |
ReferenceFrame | getReferenceFrame () const |
void | setLight (Light *light) |
Set the attached light. | |
Light * | getLight () |
Get the attached light. | |
const Light * | getLight () const |
Get the const attached light. | |
void | setStateSetModes (StateSet &, StateAttribute::GLModeValue) const |
Set the GLModes on StateSet associated with the LightSource. | |
void | setLocalStateSetModes (StateAttribute::GLModeValue value=StateAttribute::ON) |
Set up the local StateSet. | |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
virtual BoundingSphere | computeBound () const |
Compute the bounding sphere around Node's geometry or children. | |
Protected Member Functions | |
virtual | ~LightSource () |
Protected Attributes | |
StateAttribute::GLModeValue | _value |
ref_ptr< Light > | _light |
ReferenceFrame | _referenceFrame |
Leaf Node for defining a light in the scene.
osg::LightSource::LightSource | ( | ) |
osg::LightSource::LightSource | ( | const LightSource & | ls, |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY |
||
) | [inline] |
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::LightSource::~LightSource | ( | ) | [protected, virtual] |
virtual BoundingSphere osg::LightSource::computeBound | ( | ) | const [virtual] |
Compute the bounding sphere around Node's geometry or children.
This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound().
Reimplemented from osg::Group.
Light* osg::LightSource::getLight | ( | ) | [inline] |
Get the attached light.
const Light* osg::LightSource::getLight | ( | ) | const [inline] |
Get the const attached light.
ReferenceFrame osg::LightSource::getReferenceFrame | ( | ) | const [inline] |
osg::LightSource::META_Node | ( | osg | , |
LightSource | |||
) |
void osg::LightSource::setLight | ( | Light * | light | ) |
Set the attached light.
void osg::LightSource::setLocalStateSetModes | ( | StateAttribute::GLModeValue | value = StateAttribute::ON | ) |
Set up the local StateSet.
void osg::LightSource::setReferenceFrame | ( | ReferenceFrame | rf | ) |
Set the light sources's ReferenceFrame, either to be relative to its parent reference frame, or relative to an absolute coordinate frame.
RELATIVE_RF is the default. Note: setting the ReferenceFrame to be ABSOLUTE_RF will also set the CullingActive flag on the light source, and hence all of its parents, to false, thereby disabling culling of it and all its parents. This is necessary to prevent inappropriate culling, but may impact cull times if the absolute light source is deep in the scene graph. It is therefore recommended to only use absolute light source at the top of the scene.
void osg::LightSource::setStateSetModes | ( | StateSet & | , |
StateAttribute::GLModeValue | |||
) | const |
Set the GLModes on StateSet associated with the LightSource.
virtual void osg::LightSource::setThreadSafeRefUnref | ( | bool | threadSafe | ) | [virtual] |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Reimplemented from osg::Group.
ref_ptr<Light> osg::LightSource::_light [protected] |
ReferenceFrame osg::LightSource::_referenceFrame [protected] |
StateAttribute::GLModeValue osg::LightSource::_value [protected] |
![]() | Generated at Tue Mar 22 2011 13:20:22 for the OpenSceneGraph by doxygen 1.7.3. |