mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 01:30:34 -06:00
changes during feedback and cleanup
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
namespace openspace {
|
||||
|
||||
class TouchModule : public OpenSpaceModule {
|
||||
public:
|
||||
using Point = std::pair<int, TUIO::TuioPoint>;
|
||||
public:
|
||||
TouchModule();
|
||||
|
||||
private:
|
||||
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
Type = "html",
|
||||
File = "${DOCUMENTATION}/FactoryDocumentation.html"
|
||||
},
|
||||
ShutdownCountdown = 3,
|
||||
ShutdownCountdown = 0,
|
||||
-- OnScreenTextScaling = "framebuffer",
|
||||
-- PerSceneCache = true,
|
||||
-- DisableRenderingOnMaster = true,
|
||||
|
||||
Reference in New Issue
Block a user