LightPoint 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
  2. *
  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.
  7. *
  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.
  12. */
  13. #ifndef OSGSIM_LIGHTPOINT
  14. #define OSGSIM_LIGHTPOINT 1
  15. #include <osgSim/Export>
  16. #include <osgSim/Sector>
  17. #include <osgSim/BlinkSequence>
  18. #include <osg/Quat>
  19. #include <osg/Vec3>
  20. #include <osg/Vec4>
  21. namespace osgSim {
  22. class OSGSIM_EXPORT LightPoint
  23. {
  24. public:
  25. enum BlendingMode
  26. {
  27. ADDITIVE,
  28. BLENDED
  29. };
  30. LightPoint();
  31. LightPoint(const osg::Vec3& position,
  32. const osg::Vec4& color);
  33. LightPoint(bool on,
  34. const osg::Vec3& position,
  35. const osg::Vec4& color,
  36. float intensity=1.0f,
  37. float radius=1.0f,
  38. Sector* sector=0,
  39. BlinkSequence* blinkSequence=0,
  40. BlendingMode blendingMode=BLENDED);
  41. LightPoint(const LightPoint& lp);
  42. LightPoint& operator = (const LightPoint& lp);
  43. bool _on;
  44. osg::Vec3 _position;
  45. osg::Vec4 _color;
  46. float _intensity;
  47. float _radius;
  48. osg::ref_ptr<Sector> _sector;
  49. osg::ref_ptr<BlinkSequence> _blinkSequence;
  50. BlendingMode _blendingMode;
  51. };
  52. }
  53. #endif