Robotran C Documentation
AnimReader.hh
Go to the documentation of this file.
1 
6 #ifdef OPEN_GL
7 
8 #ifndef _ANIM_READER_HH_
9 #define _ANIM_READER_HH_
10 
11 #include <string>
12 #include <vector>
13 
14 namespace OpenGLMbs{
15 
19 class AnimReader
20 {
21  public:
22  AnimReader(const char* anim_filename);
23  ~AnimReader();
24 
25  void FillQ(double target_t, int nb_q, double *q_vec);
26  void FillQIndex(int index, int nb_q, double *q_vec);
27  int getNbStep() const {return t_size;}
28  double getTime(int step) const {return t_vec[step];}
29 
30  private:
31  bool IsFloat(std::string cur_str);
32  float StringToFloat(std::string cur_str);
33  int NbQCompute(const char* anim_filename);
34  void IndexTime(double target_t, int &i0, int &i1);
35 
36  int nb_q;
37  int t_size;
38 
39  double init_t;
40  double end_t;
41  double diff_t;
42 
43  std::vector<double> t_vec;
44 
45  std::vector<double*> q_tab;
46 };
47 
48 }
49 #endif
50 #endif
Realtime_option
user real-time option
Definition: realtime.h:42
OpenGLMbs
Definition: MpegFrameCaptureOptions.hh:6
mbs_data.h
Functions::user_realtime_options
user_realtime_options_ptr user_realtime_options
Definition: mbs_data.h:126
MbsData::fct
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:316
MbsData
Definition: mbs_data.h:149
Simu_realtime
real-time structure
Definition: realtime.h:99
Functions::user
struct Functions::@8 user
AnimReader.hh
AnimReader class.
user_realtime_options
void user_realtime_options(MbsData *mbs_data, Realtime_option *options)
modify the real-time options
Definition: mbs_project_realtime_fct_ptr.c:8