CustomTransformation.h

Go to the documentation of this file.
00001 /*================================================================================
00002  *  Header file for CustomTransformation Node.
00003  *  Based on code from the DynamicTransformation Node written by Gerhard Reitmayr
00004  *
00005  * @author Simon DiMaio
00006  *
00007  * $Id:
00008  * @file
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         /* constructor method. It sets default values on the
00041          * underlying StaticTransformation. */
00042         CustomTransformation( int baseEvent_ = 1, bool usePos_ = true, bool useOrient_ = true);
00043 
00044         /*
00045          * this method is called by the EventGenerator to update it's observers.
00046          * This class computes a transformed event, stores it in its local variable
00047          * and notifies its observers in turn, propagating the change.
00048          */
00049         virtual void onEventGenerated( Event& event, Node& generator);
00050 
00051         friend class CommonNodeFactory;
00052 
00053     };
00054 
00055 } // namespace ot
00056 
00057 #endif

Generated on Wed Feb 28 15:18:49 2007 for NaviTrack by  doxygen 1.4.6