vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MarkerFactory.h
Go to the documentation of this file.
1 #ifndef VF_MARKER_FACTORY
2 #define VF_MARKER_FACTORY
3 
4 #include <vrecko/Ability.h>
5 #include <vreckoDP/base/PHANToM.h>
6 
7 
8 #include "Auxiliary.h"
9 #include "Marker.h"
10 
11 using namespace vrecko;
12 using namespace vreckoDP_base;
13 namespace VirtualFixture{
14 
15 class MarkerFactory: public PHANToMFilter {
16  public:
17  MarkerFactory();
19 
21  void apply(PHANToM *pPHANToM, osg::Vec3 &force);
22  void processEvent(const std::string &input_name, void *value);
23 
24  void preInitialize(void);
25  void postInitialize(void);
26  void update(void);
27 
28  int addMarker(); //return id of new marker
29  void removeAllMarkers(); //remove all markers from scene and free memory
30 
31 
32  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
33  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
34 
35  protected:
36  PHANToM *PHANToMDevice;
37  bool all_on;
38  bool active; //if true, it will be active
39 
40  int num_of_markers; //amount of markers
41  vector<Marker> markers; //data store for markers
42  osg::Vec3 act_position; //actual position of device
43 
44 };
45 
46 };
47 
48 #endif