-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBL_csv.hpp
34 lines (26 loc) · 860 Bytes
/
BL_csv.hpp
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
#ifndef BL_CSV_HPP
#define BL_CSV_HPP
#include "Module.hpp"
using std::vector;
using std::string;
class CSVMotion : public Module {
public:
CSVMotion(string filename, double seconds_per_frame);
virtual ~CSVMotion();
virtual Vector2f size();
virtual void draw(Box2f viewport, Box2f screen_viewport, float scale, unsigned int recurse = 0);
virtual void update(float elapsed_time);
virtual bool handle_event(SDL_Event const &event, Vector2f mouse);
vector< string > names;
vector< vector< Vector3d > > positions;
vector< Vector3d > roots; //(x,y, z_rot)
Box3d bounds; //bounds of local poses
bool playing;
double time_acc;
double seconds_per_frame;
PortDataContainer< vector< double > > lengths;
PortDataContainer< unsigned int > frame;
PortDataContainer< vector< unsigned int > > highlight;
void update_lengths();
};
#endif //BL_CSV_HPP