Blender V2.61 - r43446
|
00001 /* 00002 * Object.hpp 00003 * 00004 * Created on: Jan 5, 2009 00005 * Author: rubensmits 00006 */ 00007 00008 #ifndef OBJECT_HPP_ 00009 #define OBJECT_HPP_ 00010 00011 #include "Cache.hpp" 00012 #include "kdl/frames.hpp" 00013 #include <string> 00014 00015 namespace iTaSC{ 00016 00017 class WorldObject; 00018 00019 class Object { 00020 public: 00021 enum ObjectType {Controlled, UnControlled}; 00022 static WorldObject world; 00023 00024 private: 00025 ObjectType m_type; 00026 protected: 00027 Cache *m_cache; 00028 KDL::Frame m_internalPose; 00029 bool m_updated; 00030 virtual void updateJacobian()=0; 00031 public: 00032 Object(ObjectType _type):m_type(_type), m_cache(NULL), m_internalPose(F_identity), m_updated(false) {}; 00033 virtual ~Object(){}; 00034 00035 virtual int addEndEffector(const std::string& name){return 0;}; 00036 virtual void finalize(){}; 00037 virtual const KDL::Frame& getPose(const unsigned int end_effector=0){return m_internalPose;}; 00038 virtual const ObjectType getType(){return m_type;}; 00039 virtual const unsigned int getNrOfCoordinates(){return 0;}; 00040 virtual void updateKinematics(const Timestamp& timestamp)=0; 00041 virtual void pushCache(const Timestamp& timestamp)=0; 00042 virtual void initCache(Cache *_cache) = 0; 00043 bool updated() {return m_updated;}; 00044 void updated(bool val) {m_updated=val;}; 00045 }; 00046 00047 } 00048 #endif /* OBJECT_HPP_ */