change TUIO protocol from v2.0 to v1.1 to support a wider range of sender applications

This commit is contained in:
Jonathan Bosson
2017-02-21 14:00:36 -07:00
parent 2d223dc250
commit c4bd08c19e
92 changed files with 5296 additions and 5454 deletions

View File

@@ -67,21 +67,25 @@ TouchModule::TouchModule()
OsEng.registerModuleCallback( // maybe call ear->clearInput() here rather than postdraw
OpenSpaceEngine::CallbackOption::PreSync,
[&]() {
std::vector<TuioObject*> list = ear->getInput();
std::vector<TuioObject*> group;
std::vector<TuioCursor*> list = ear->getInput();
std::vector<TuioCursor*> group;
glm::vec2 centroid;
ear->unlock();
std::string s = "";
//print list for debugging
std::string s = "";
const std::string _loggerCat = "TouchModule";
std::ostringstream os;
for (auto &&j : list) {
os << " (" << j->getTuioPointer()->getX() << "," << j->getTuioPointer()->getY() << ") ";
os << " (" << j->getX() << "," << j->getY() << ") ";
}
if (list.size() > 0)
LINFO("List size: " << list.size() << os.str() << "\n");
os.clear();
ear->clearInput();
/*
// step through the list (from the start) and find each unique id TuioObject
for (auto &&i : list) {
bool sameId = false;
@@ -104,7 +108,7 @@ TouchModule::TouchModule()
}
}
}*/
//if (centroid.x + centroid.y != 0.0f)
//LINFO("List size: " << list.size() << ", Centroid: (" << centroid.x << ", " << centroid.y << ")\n");
@@ -117,7 +121,7 @@ TouchModule::TouchModule()
[&]() {
WindowWrapper& wrapper = OsEng.windowWrapper();
if (OsEng.isMaster() && wrapper.isRegularRendering()) {
ear->clearInput();
}
}
);