OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lightcontroller.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_SCENEUTIL_LIGHTCONTROLLER_H
2 #define OPENMW_COMPONENTS_SCENEUTIL_LIGHTCONTROLLER_H
3 
4 #include <osg/NodeCallback>
5 #include <osg/Vec4f>
6 
7 namespace SceneUtil
8 {
9 
12  class LightController : public osg::NodeCallback
13  {
14  public:
15  enum LightType {
21  };
22 
24 
25  void setType(LightType type);
26 
27  void setDiffuse(const osg::Vec4f& color);
28 
29  virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
30 
31  private:
33  osg::Vec4f mDiffuseColor;
34  float mPhase;
35  float mDeltaCount;
37  double mLastTime;
38  };
39 
40 }
41 
42 #endif
float mDeltaCount
Definition: lightcontroller.hpp:35
void setDiffuse(const osg::Vec4f &color)
Definition: lightcontroller.cpp:128
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
Definition: lightcontroller.cpp:61
double mLastTime
Definition: lightcontroller.hpp:37
Definition: lightcontroller.hpp:16
LightType mType
Definition: lightcontroller.hpp:32
LightType
Definition: lightcontroller.hpp:15
void setType(LightType type)
Definition: lightcontroller.cpp:56
Definition: lightcontroller.hpp:18
Definition: lightcontroller.hpp:20
float mPhase
Definition: lightcontroller.hpp:34
Definition: lightcontroller.hpp:19
Definition: lightcontroller.hpp:17
Controller class to handle a pulsing and/or flickering light.
Definition: lightcontroller.hpp:12
int mDirection
Definition: lightcontroller.hpp:36
osg::Vec4f mDiffuseColor
Definition: lightcontroller.hpp:33
LightController()
Definition: lightcontroller.cpp:47