00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _CUSTOMTRANSFORMATION_H
00012 #define _CUSTOMTRANSFORMATION_H
00013
00014 #include <OpenTracker/OpenTracker.h>
00015 #include <OpenTracker/common/StaticTransformation.h>
00016 #include <OpenTracker/dllinclude.h>
00017 #include "math.h"
00018 #include <OpenTracker/core/MathUtils.h>
00019
00020 namespace ot {
00021
00022 class OPENTRACKER_API CustomTransformation : public StaticTransformation
00023 {
00024 protected:
00025
00028 Event store1;
00029 Event store2;
00031 int baseEvent;
00032
00033 void ncross(float *v1, float *v2, float *result);
00034 void QuaternionToHeading(float *qin, float *result);
00035 void FrameToQuaternion(float *Vx, float *Vy, float *Vz, std::vector<float>&);
00036 void Compute_6DOF(Event &sensor1, Event &sensor2, Event &newevent);
00037
00038 public:
00039
00040
00041
00042 CustomTransformation( int baseEvent_ = 1, bool usePos_ = true, bool useOrient_ = true);
00043
00044
00045
00046
00047
00048
00049 virtual void onEventGenerated( Event& event, Node& generator);
00050
00051 friend class CommonNodeFactory;
00052
00053 };
00054
00055 }
00056
00057 #endif