vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AxisLock.h
Go to the documentation of this file.
1 #ifndef VF_AXISLOCK
2 #define VF_AXISLOCK
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 AxisLock: public PHANToMFilter {
12  public:
13  AxisLock();
14  ~AxisLock() {};
15 
17  void apply(PHANToM *pPHANToM, osg::Vec3 &force);
18  void processEvent(const std::string &input_name, void *value);
19 
20  void preInitialize(void);
21  void postInitialize(void);
22  void update(void);
23 
24  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
25  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
26 
27  protected:
28  PHANToM *PHANToMDevice;
29  bool all_on;
30  bool active; //VF switcher
31  bool locked; //if true -> locked
32  osg::Vec3 position; //position of starting point
33  float nullradius; //radius close to centre, where attractive field is NOT applied
34  float stiffness; //stiffness of attractive field = how strong it would be for every meter of space
35  string defstring; //definition of lock (what axis will be locked)
36 };
37 
38 };
39 #endif