-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathKKAttributeGenerator.h
More file actions
executable file
·33 lines (27 loc) · 999 Bytes
/
KKAttributeGenerator.h
File metadata and controls
executable file
·33 lines (27 loc) · 999 Bytes
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
/*
* KKAttributeGenerator.h
* Proton
*
* Created by Kenrick Kin on 8/13/12.
*
*/
#ifndef KKATTRIBUTEGENERATOR_H
#define KKATTRIBUTEGENERATOR_H
#include "Pt/AttributeGenerator.h"
#include "Pt/TuioTouchSymbol.h"
class KKAttributeGenerator : public PtAttributeGenerator {
/// returns "KK" as hit-target
std::string attributeValue(const PtTouchSymbol &touchSymbol, std::vector<PtTouchSymbols *> *touchStream) const {
return std::string("KK");
// print touch locations at each frame
/*for(int i = 0; i < touchStream->size(); i++) {
PtTouchSymbols *frame = (*touchStream)[i];
for(int j = 0; j < frame->size(); j++) {
PtTuioTouchSymbol *tS = static_cast<PtTuioTouchSymbol*>((*frame)[j]);
printf("frame: %d, touchSymbol: %s\n", i, tS->symbolString().c_str());
printf("x: %f, y: %f\n", tS->tuioCursor()->getX(), tS->tuioCursor()->getY());
}
}*/
}
};
#endif