mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
fix to panning speed into direct-manipulation issue
This commit is contained in:
@@ -129,6 +129,7 @@ void TouchInteraction::updateStateFromInput(const std::vector<TuioCursor>& list,
|
||||
|
||||
// evaluates if current frame is in directTouchMode (will if so be used next frame)
|
||||
if (_currentRadius > _nodeRadiusThreshold && _selected.size() == list.size()) { // needs better definition?
|
||||
_vel.pan = glm::dvec2(0.0, 0.0);
|
||||
_directTouchMode = true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -88,17 +88,14 @@ void TuioEar::updateTuioCursor(TuioCursor *tcur) {
|
||||
void TuioEar::removeTuioCursor(TuioCursor *tcur) {
|
||||
_mx.lock();
|
||||
_removeList.push_back(tcur->getSessionID());
|
||||
|
||||
if (!_list.empty()) {
|
||||
double dist = 0;
|
||||
for (const TuioPoint& p : tcur->getPath()) {
|
||||
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) {
|
||||
_tapCo = TuioCursor(*tcur);
|
||||
_tap = true;
|
||||
}
|
||||
double dist = 0;
|
||||
for (const TuioPoint& p : tcur->getPath()) {
|
||||
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) {
|
||||
_tapCo = TuioCursor(*tcur);
|
||||
_tap = true;
|
||||
}
|
||||
_mx.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user