1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
14#ifndef OSGSIM_LIGHTPOINTSYSTEM
15#define OSGSIM_LIGHTPOINTSYSTEM 1
24 * LightPointSYSTEM encapsulates animation and intensity state in a single object
25 * that can be shared by several osgSim::LightPointNodes, thereby allowing an
26 * application to efficiently control the animation/intensity state of
27 * several LightPointNodes.
29class LightPointSystem : public osg::Object
32 LightPointSystem() : _intensity( 1.f ), _animationState( ANIMATION_ON )
35 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
36 LightPointSystem( const LightPointSystem& lps, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY ) :
37 osg::Object( lps, copyop ), _intensity( lps._intensity ), _animationState( lps._animationState )
40 META_Object( osgSim, LightPointSystem );
48 void setIntensity( float intensity ) { _intensity = intensity; }
49 float getIntensity() const { return _intensity; }
51 void setAnimationState( LightPointSystem::AnimationState state ) { _animationState = state; }
52 LightPointSystem::AnimationState getAnimationState() const { return _animationState; }
55 ~LightPointSystem() {}
58 AnimationState _animationState;