mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 14:29:42 -05:00
improvement to tap interpretation by time instead of path size
This commit is contained in:
@@ -94,7 +94,8 @@ void TuioEar::removeTuioCursor(TuioCursor *tcur) {
|
||||
dist += glm::length(glm::dvec2(p.getX(), p.getY()) - glm::dvec2(tcur->getX(), tcur->getY()));
|
||||
}
|
||||
dist /= tcur->getPath().size();
|
||||
if (tcur->getPath().size() < 7 && dist < 0.0004 && _list.size() == 1 && _removeList.size() == 1) {
|
||||
double heldTime = tcur->getPath().back().getTuioTime().getTotalMilliseconds() - tcur->getPath().front().getTuioTime().getTotalMilliseconds();
|
||||
if (heldTime < 180 && dist < 0.0004 && _list.size() == 1 && _removeList.size() == 1) {
|
||||
_tapCo = TuioCursor(*tcur);
|
||||
_tap = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user