mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-28 16:09:46 -06:00
TuioEar can now detect a tap, implemented picking feature. If a selectable node is tapped at that is set as the new focusNode and the camera does a panning to that direction. If not will the camera zoom in towards the focusNode
This commit is contained in:
@@ -71,8 +71,15 @@ bool TouchModule::gotNewInput() {
|
||||
) == list.end(); }),
|
||||
lastProcessed.end());
|
||||
|
||||
// Return true if we got new input
|
||||
// Tap
|
||||
if (list.size() == 0 && lastProcessed.size() == 0 && ear->tap()) {
|
||||
TuioCursor c = ear->getTap();
|
||||
list.push_back(c);
|
||||
lastProcessed.push_back(std::make_pair(c.getSessionID(), c.getPath().back()));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return true if we got new input
|
||||
if (list.size() == lastProcessed.size() && list.size() > 0) {
|
||||
bool newInput = true;
|
||||
for_each(lastProcessed.begin(), lastProcessed.end(), [this, &newInput](Point& p) {
|
||||
|
||||
Reference in New Issue
Block a user