1 #ifndef OPENMW_COMPONENTS_SCENEUTIL_CONTROLLER_H
2 #define OPENMW_COMPONENTS_SCENEUTIL_CONTROLLER_H
4 #include <boost/shared_ptr.hpp>
6 #include <osg/NodeVisitor>
15 virtual float getValue(osg::NodeVisitor* nv) = 0;
22 virtual float getValue(osg::NodeVisitor* nv);
29 virtual float calculate(
float input)
const = 0;
46 void setSource(boost::shared_ptr<ControllerSource> source);
47 void setFunction(boost::shared_ptr<ControllerFunction>
function);
49 boost::shared_ptr<ControllerSource>
getSource()
const;
50 boost::shared_ptr<ControllerFunction>
getFunction()
const;
53 boost::shared_ptr<ControllerSource>
mSource;
65 virtual void apply(osg::Node& node);
FrameTimeSource()
Definition: controller.cpp:49
virtual void visit(osg::Node &node, Controller &ctrl)=0
boost::shared_ptr< ControllerSource > getSource() const
Definition: controller.cpp:39
virtual float getValue(osg::NodeVisitor *nv)
Definition: controller.cpp:53
Finds the maximum of all controller functions in the given scene graph.
Definition: controller.hpp:85
void setSource(boost::shared_ptr< ControllerSource > source)
Definition: controller.cpp:29
virtual void visit(osg::Node &, Controller &ctrl)
Definition: controller.cpp:110
float getMaxLength() const
Definition: controller.cpp:116
FindMaxControllerLengthVisitor()
Definition: controller.cpp:104
void setFunction(boost::shared_ptr< ControllerFunction > function)
Definition: controller.cpp:34
float mMaxLength
Definition: controller.hpp:95
Pure virtual base class - visit() all controllers that are attached as UpdateCallbacks in a scene gra...
Definition: controller.hpp:60
virtual ~Controller()
Definition: controller.hpp:40
virtual float getValue(osg::NodeVisitor *nv)=0
float getInputValue(osg::NodeVisitor *nv)
Definition: controller.cpp:21
Controller()
Definition: controller.cpp:12
virtual void visit(osg::Node &node, Controller &ctrl)
Definition: controller.cpp:98
Definition: controller.hpp:36
virtual float getMaximum() const =0
AssignControllerSourcesVisitor()
Definition: controller.cpp:87
boost::shared_ptr< ControllerFunction > getFunction() const
Definition: controller.cpp:44
boost::shared_ptr< ControllerSource > mSource
Definition: controller.hpp:53
virtual ~ControllerSource()
Definition: controller.hpp:14
ControllerVisitor()
Definition: controller.cpp:58
Definition: controller.hpp:18
boost::shared_ptr< ControllerSource > mToAssign
Definition: controller.hpp:81
boost::shared_ptr< ControllerFunction > mFunction
Definition: controller.hpp:56
Definition: controller.hpp:26
bool hasInput() const
Definition: controller.cpp:16
Definition: controller.hpp:11
virtual float calculate(float input) const =0
Definition: controller.hpp:70
virtual void apply(osg::Node &node)
Definition: controller.cpp:64