00001 #ifndef SCRIPT_H
00002 #define SCRIPT_H
00003
00004 class JWalk;
00005 #include "Walk/jwalkincludes.h"
00006
00007 class script
00008 {
00009 public:
00010 script();
00011 script(std::string file, JWalk* pjwalk);
00012 bool loadFile(std::string file);
00013 int play(bool block);
00014 std::string getFileName() {return m_fileName;}
00015 int getNumSteps() {return m_scriptLength;}
00016 bool hasScript() {return m_hasScript;}
00017 float getRunningTime();
00018 void print();
00019 bool setStiffness(float newStiffness);
00020 private:
00021 JWalk* jwalk;
00022 bool m_hasScript;
00023 std::string m_fileName;
00024 std::vector<std::string> m_jointNames;
00025 std::vector<float> m_timePoints;
00026 std::vector< std::vector<float> > m_jointPositions;
00027 int m_scriptLength;
00028 };
00029
00030 #endif