vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Marker.h
Go to the documentation of this file.
1 #ifndef VF_MARKER
2 #define VF_MARKER
3 
4 #include <vrecko/Ability.h>
5 #include <vreckoDP/base/PHANToM.h>
6 
7 using namespace vrecko;
8 using namespace vreckoDP_base;
9 namespace VirtualFixture{
10 
11 class Marker: public PHANToMFilter {
12  public:
13  Marker();
14  Marker(int newid, osg::Vec3 newposition);
15  Marker(int newid, osg::Vec3 newposition, std::string newlabel, std::string newdescribtion);
16  ~Marker() {};
17 
19  void apply(PHANToM *pPHANToM, osg::Vec3 &force);
20  void processEvent(const std::string &input_name, void *value);
21 
22  void preInitialize(void);
23  void postInitialize(void);
24  void update(void);
25 
26  void setPosition(osg::Vec3 newposition) {position = newposition;};
27  osg::Vec3 getPosition() {return position;};
28  void setId(int newid) {id = newid;};
29  int getId() {return id;};
30  void setLabel(std::string newlabel) {label = newlabel;};
31  std::string getLabel() {return label;};
32  void setDescribtion(std::string newdescribtion) {describtion = newdescribtion;};
33  std::string getDescribtion() {return describtion;};
34 
35  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
36  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
37 
38 
39  protected:
40  PHANToM *PHANToMDevice;
41  bool all_on;
42 
43  bool active; //if true, it will be active
44 
45  osg::Vec3 position; //?? is it necessary ?? we have position from OSG tree
46  int id; //marker id .. will be added automatically
47  std::string label; //for selection menu
48  std::string describtion; //longer that label
49 
50 };
51 
52 };
53 #endif