vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SetObjectTransformFilter.h
Go to the documentation of this file.
1 #ifndef SET_OBJECT_MATRIX_FILTER_H
2 #define SET_OBJECT_MATRIX_FILTER_H
3 
5 
6 #ifdef COMPILE_PHANTOM_DEVICE
7 
8 namespace vreckoDP_PHANToM {
9 
10 /* PHANToM filter to get the current Phantom position and set an object position accordingly
11  using MTMatrixTransform ability. The force is unchanged.*/
12 class SetObjectTransformFilter : public PHANToMFilter {
13 public:
14  SetObjectTransformFilter();
15 
16  virtual bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parameters);
17 
18  virtual void apply(PHANToMSTATE &pState, osg::Vec3 &force, osg::Vec3 &torque);
19 
20 protected:
21  osg::Matrix originalScale;
22  osg::Vec3 offsetFromCenter; // Offset of the phantom reference point
23 
24  osg::Matrix cachedMatrix;
25 };
26 
27 }
28 
29 #endif
30 
31 #endif