blob: 884600b2633c7015083db5a0c1f38ae9a55aebc4 (
plain)
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
|
#ifndef OBTSDEVICE_H
#define OBTSDEVICE_H
#include "ofMain.h"
/*
created with icon, colour, linesize etc
in order to draw need to know:
time now: in order to draw relatively (this is not actual time as it can draw historically)
scale: fixed (defined at object creation)
or always zoom out? (begin time defined at object creation)
events: connect(is create) disconnect() call(* obtsDevice) hangup() sms(* obtsDevice)
functions: draw(time) getPosition(time)
variables: pointer to icon image
*/
struct timeseg{
timeseg(float _st,float _et){
startTime=_st;
endTime=_et;
}
float startTime;
float endTime;
};
class obtsDevice
{
public:
obtsDevice();
obtsDevice(string &imsi,ofImage *_icon,ofVec2f _coords);
virtual ~obtsDevice();
void draw(float timeScale); //units per second
void connect();
void disconnect();
protected:
private:
string IMSI;
ofVec2f coords; //angular coords
vector<timeseg> connectionHistory;
ofImage *icon;
};
#endif // OBTSDEVICE_H
|