changes during feedback and cleanup

This commit is contained in:
Jonathan Bosson
2017-05-12 15:55:20 -06:00
parent e28897eee7
commit 542e4c0fcb
3 changed files with 13 additions and 5 deletions

View File

@@ -88,9 +88,17 @@ void TuioEar::updateTuioCursor(TuioCursor *tcur) {
void TuioEar::removeTuioCursor(TuioCursor *tcur) {
_mx.lock();
_removeList.push_back(tcur->getSessionID());
if (tcur->getPath().size() < 4 && tcur->getMotionSpeed() < 0.03 && _list.size() == _removeList.size() == 1) { // maybe take away motionspeed
_tapCo = TuioCursor(*tcur);
_tap = true;
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;
}
}
_mx.unlock();
}

View File

@@ -32,8 +32,8 @@
namespace openspace {
class TouchModule : public OpenSpaceModule {
public:
using Point = std::pair<int, TUIO::TuioPoint>;
public:
TouchModule();
private:

View File

@@ -87,7 +87,7 @@ return {
Type = "html",
File = "${DOCUMENTATION}/FactoryDocumentation.html"
},
ShutdownCountdown = 3,
ShutdownCountdown = 0,
-- OnScreenTextScaling = "framebuffer",
-- PerSceneCache = true,
-- DisableRenderingOnMaster = true,