"...git@forge.univ-lyon1.fr:Alexandre.Meyer/lifapcd.git" did not exist on "1b4af2d9230db2c58cd0dcfbdf92a138c47c0f50"
Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef MOTION_H
#define MOTION_H
#include <string>
#include <vector>
typedef unsigned long DWORD;
class Motion {
public:
// Constructor with the filename containing the motion data
Motion(const std::string & filename);
// get the number of frames in the motion
unsigned int getNbFrames() const {return _nbFrames;}
// get the frequency of the motion data (in seconds)
float getFrequency() const {return _frequency;}
// get the data at given frame
std::vector<float> getMotionDataAtFrame(unsigned int frameIndex) const;
// get the data at given frame and joint
float getMotionDataAtFrameJoint(unsigned int index, unsigned int joint) const;
// get/set startingTime
DWORD getStartTime() const {return _startTime;}
void setStartTime(DWORD stime) {_startTime=stime;}
protected:
unsigned int _nbFrames; // number of frames
float _frequency; // motion frequency
unsigned int _nbJoints; // number of joints
std::vector<std::vector<float> > _motionData; // the motion data
DWORD _startTime; // timer
};
#endif