2005-04-15 05:41:28 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2005 Robert Osfield
|
2003-01-22 00:45:36 +08:00
|
|
|
*
|
|
|
|
* This library is open source and may be redistributed and/or modified under
|
|
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* OpenSceneGraph Public License for more details.
|
|
|
|
*/
|
2002-11-19 18:57:40 +08:00
|
|
|
|
2003-01-06 21:45:55 +08:00
|
|
|
#ifndef OSGSIM_LIGHTPOINT
|
2002-11-19 18:57:40 +08:00
|
|
|
#define OSGSIM_LIGHTPOINT 1
|
|
|
|
|
|
|
|
#include <osgSim/Export>
|
|
|
|
#include <osgSim/Sector>
|
|
|
|
#include <osgSim/BlinkSequence>
|
|
|
|
|
|
|
|
#include <osg/Quat>
|
|
|
|
#include <osg/Vec3>
|
|
|
|
#include <osg/Vec4>
|
|
|
|
|
|
|
|
namespace osgSim {
|
|
|
|
|
|
|
|
|
|
|
|
class OSGSIM_EXPORT LightPoint
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2002-12-11 03:56:14 +08:00
|
|
|
enum BlendingMode
|
|
|
|
{
|
|
|
|
ADDITIVE,
|
|
|
|
BLENDED
|
|
|
|
};
|
|
|
|
|
2002-11-19 18:57:40 +08:00
|
|
|
LightPoint();
|
|
|
|
|
2002-12-11 03:56:14 +08:00
|
|
|
LightPoint(const osg::Vec3& position,
|
|
|
|
const osg::Vec4& color);
|
|
|
|
|
2003-09-01 23:46:10 +08:00
|
|
|
LightPoint(bool on,
|
2002-12-11 03:56:14 +08:00
|
|
|
const osg::Vec3& position,
|
|
|
|
const osg::Vec4& color,
|
|
|
|
float intensity=1.0f,
|
|
|
|
float radius=1.0f,
|
|
|
|
Sector* sector=0,
|
|
|
|
BlinkSequence* blinkSequence=0,
|
|
|
|
BlendingMode blendingMode=BLENDED);
|
|
|
|
|
|
|
|
|
2002-11-19 18:57:40 +08:00
|
|
|
LightPoint(const LightPoint& lp);
|
2002-12-11 03:56:14 +08:00
|
|
|
|
|
|
|
LightPoint& operator = (const LightPoint& lp);
|
|
|
|
|
2002-11-19 18:57:40 +08:00
|
|
|
|
2003-09-01 23:46:10 +08:00
|
|
|
bool _on;
|
2002-11-19 18:57:40 +08:00
|
|
|
osg::Vec3 _position;
|
|
|
|
osg::Vec4 _color;
|
|
|
|
float _intensity;
|
|
|
|
float _radius;
|
|
|
|
|
|
|
|
osg::ref_ptr<Sector> _sector;
|
|
|
|
osg::ref_ptr<BlinkSequence> _blinkSequence;
|
2002-12-11 03:56:14 +08:00
|
|
|
|
2003-09-01 23:46:10 +08:00
|
|
|
BlendingMode _blendingMode;
|
2002-11-19 18:57:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|