Thrive
node_attachable.h
1 #pragma once
2 
3 #include <memory>
4 
5 namespace Ogre {
6 
7  class SceneNode;
8 }
9 
10 namespace thrive{
11 
16 public:
17 
19  ~NodeAttachable();
20 
24  void detachFromNode();
25 
29  void attachToNode(Ogre::SceneNode* node);
30 
32  Ogre::SceneNode* getAttachedNode() const;
33 
34 protected:
35 
37  virtual void
38  onMoved(Ogre::SceneNode* node) = 0;
39 
40 private:
41 
42  struct Implementation;
43  std::unique_ptr<Implementation> m_impl;
44 };
45 
46 }
virtual void onMoved(Ogre::SceneNode *node)=0
Called when node callback has updated position and node graph has been updated.
void attachToNode(Ogre::SceneNode *node)
Attaches this object to an Ogre SceneNode and makes this move with the node.
Definition: node_attachable.cpp:120
Ogre::SceneNode * getAttachedNode() const
Returns the ogre node.
Definition: node_attachable.cpp:128
void detachFromNode()
Detaches this from a scene node, stops this from moving with the node.
Definition: node_attachable.cpp:114
A helper class for sound objects that want to move with Ogre::SceneNode.
Definition: node_attachable.h:15
Definition: bullet_ogre_conversion.h:6
Definition: debug_drawing.h:8