Blender V2.61 - r43446

MovingFrame.hpp

Go to the documentation of this file.
00001 /*
00002  * MovingFrame.h
00003  *
00004  *  Created on: Feb 10, 2009
00005  *      Author: benoitbolsee
00006  */
00007 
00008 #ifndef MOVINGFRAME_HPP_
00009 #define MOVINGFRAME_HPP_
00010 
00011 #include "UncontrolledObject.hpp"
00012 #include <vector>
00013 
00014 
00015 namespace iTaSC{
00016 
00017 typedef bool (*MovingFrameCallback)(const Timestamp& timestamp, const Frame& _current, Frame& _next, void *param);
00018 
00019 class MovingFrame: public UncontrolledObject {
00020 public:
00021     MovingFrame(const Frame& frame=F_identity);
00022     virtual ~MovingFrame();
00023 
00024     bool setFrame(const Frame& frame);
00025     bool setCallback(MovingFrameCallback _function, void* _param);
00026 
00027     virtual void updateCoordinates(const Timestamp& timestamp);
00028     virtual void updateKinematics(const Timestamp& timestamp);
00029     virtual void pushCache(const Timestamp& timestamp);
00030     virtual void initCache(Cache *_cache);
00031     virtual void finalize();
00032 protected:
00033     virtual void updateJacobian();
00034 
00035 private:
00036     void pushInternalFrame(CacheTS timestamp);
00037     bool popInternalFrame(CacheTS timestamp);
00038     MovingFrameCallback m_function;
00039     void* m_param;
00040     Frame m_nextPose;
00041     Twist m_velocity;
00042     int m_poseCCh;      // cache channel for pose
00043     unsigned int m_poseCTs;
00044 };
00045 
00046 }
00047 
00048 #endif /* MOVINGFRAME_H_ */