OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotatecontroller.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_MWRENDER_ROTATECONTROLLER_H
2 #define OPENMW_MWRENDER_ROTATECONTROLLER_H
3 
4 #include <osg/NodeCallback>
5 #include <osg/Quat>
6 
7 namespace MWRender
8 {
9 
14 class RotateController : public osg::NodeCallback
15 {
16 public:
17  RotateController(osg::Node* relativeTo);
18 
19  void setEnabled(bool enabled);
20 
21  void setRotate(const osg::Quat& rotate);
22 
23  virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
24 
25 protected:
26  osg::Quat getWorldOrientation(osg::Node* node);
27 
28  bool mEnabled;
29  osg::Quat mRotate;
30  osg::Node* mRelativeTo;
31 };
32 
33 
34 }
35 
36 #endif
osg::Quat getWorldOrientation(osg::Node *node)
Definition: rotatecontroller.cpp:44
Definition: rotatecontroller.hpp:14
void setEnabled(bool enabled)
Definition: rotatecontroller.cpp:15
RotateController(osg::Node *relativeTo)
Definition: rotatecontroller.cpp:8
osg::Node * mRelativeTo
Definition: rotatecontroller.hpp:30
osg::Quat mRotate
Definition: rotatecontroller.hpp:29
void setRotate(const osg::Quat &rotate)
Definition: rotatecontroller.cpp:20
bool mEnabled
Definition: rotatecontroller.hpp:28
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
Definition: rotatecontroller.cpp:25