blob: 5aadec62da0f6c133e0f5be5e2acb8adef28cd1a (
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
|
#ifndef PLAYER_H
#define PLAYER_H
#include "ofMain.h"
#include "ofxOpenCv.h"
class player : public ofTessellator
{
public:
player();
virtual ~player();
void setScreenPosition(ofVec2f _pos);
void setWorldPosition(ofVec3f _pos);
ofVec3f getWorldPosition();
ofVec2f getScreenPosition();
ofVec3f getCaughtPos();
void update(ofxCvBlob blob);
void draw();
void caught();
bool isCaught;
bool active; //still on screen
void carried(ofVec3f _posOffset);
void setCatchTransform(ofVec3f _catchPos,ofVec3f _catchScale);
protected:
private:
ofMesh billboard;
ofPolyline outline;
ofVec3f worldPosition;
ofVec2f screenPosition;
ofVec2f caughtPos;
ofVec3f catchPos;
ofVec3f catchScale;
ofVec2f posOffset;
};
#endif // PLAYER_H
|