vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HookManager.h
Go to the documentation of this file.
1 #pragma once
2 #include "Hook.h"
3 
4 namespace APDYNAMICART
5 {
6 
8 
12 {
13 public:
14  static HookManager* get()
15  {
16  static HookManager manager;
17  return &manager;
18  }
19 
20  void init(EnvironmentObject* parent);
21  void addHook(HookObject* hookObject);
22  void removeHook(unsigned int index);
23  void removeHook(HookObject* hookObject);
24  void removeAllHooks();
25  void removeHooksOnHoop(Hoop* hoop);
26 
27  typedef std::vector< osg::ref_ptr<HookObject> > HookArray;
28  const HookArray& getHooks() const { return _hooks; }
29 
31  void load( HoopPtr hoop, int sectorsCount, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* PoANode );
32  void save( HoopPtr hoop, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* poaNode );
33 
34 protected:
35  HookManager(); //Protected constructor, so no one can create instance of this class
38 };
39 }
40