-
Notifications
You must be signed in to change notification settings - Fork 2
/
experimenttrial.h
50 lines (38 loc) · 1.36 KB
/
experimenttrial.h
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
45
46
47
48
49
50
#ifndef EXPERIMENTTRIAL_H
#define EXPERIMENTTRIAL_H
#include <MultiWidgets/Widget.hpp>
#include <MultiWidgets/GrabManager.hpp>
#include <MultiWidgets/SimpleSDLApplication.hpp>
#include "locationawarewidget.h"
#include "connectioncheck.h"
#include "logthread.h"
class ExperimentTrial : public MultiWidgets::Widget
{
public:
enum RotationDirection {Clockwise, Counterclockwise};
ExperimentTrial( int id, RotationDirection direction, int distance, int size, int angle, int x1, int y1);
~ExperimentTrial();
void setApplication( MultiWidgets::GrabManager * application);
void setFilename(const std::string & name) { filename = name; }
bool isFinished();
void finish();
virtual void renderContent(Luminous::RenderContext & r);
LogThread * getLogger() { return logger; }
virtual void input(MultiWidgets::GrabManager & gm, float dt);
private:
std::string filename;
int id;
RotationDirection direction;
int size;
double angle;
int distance;
Nimble::Vector2 target1, target2;
void createUI();
LocationAwareWidget * createMovable(Nimble::Vector2 pos, Nimble::Vector2 target);
LocationAwareWidget * first;
LocationAwareWidget * second;
LogThread * logger;
MultiWidgets::GrabManager * application;
virtual void processMessage (const char * id, Radiant::BinaryData & data);
};
#endif // EXPERIMENTTRIAL_H