mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 06:48:35 -05:00
Update of touch table interface code (#561)
* Version of touch interface for user study that has disabled panning and limited zoom to prevent zooming through the planet surface * Update starlabels.data file * Enable minimum picking distance in NDC * Fix stack corruption bug in TouchMarker * Version of touch interface for user study that has disabled panning and limited zoom to prevent zooming through the planet surface * Fix stack corruption bug in TouchMarker * Add time limit to levmarq solver * Add debug properties to touch GUI with a compile time flag * Guard against accessing outside bounds * Added exponential zoom for faster zoom with increased distance from focus node * Refined the exponential zoom for better behavior on the touch table * Added properties for disabling panning and node boundary sphere multiplier for zoom * Added more debug logging and stopped using camera focusNode (looks deprecated) for distance calculation * Found error in the deceleration algorithm * Default-disable debug logging, exponential zoom coeff change and additional debug log statement
This commit is contained in:
committed by
Alexander Bock
parent
9a44d9c9df
commit
5380636932
@@ -37,6 +37,8 @@
|
||||
#include <openspace/properties/vector/ivec2property.h>
|
||||
#include <openspace/properties/vector/vec4property.h>
|
||||
|
||||
//#define TOUCH_DEBUG_PROPERTIES
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class Camera;
|
||||
@@ -170,13 +172,34 @@ private:
|
||||
properties::FloatProperty _rollAngleThreshold;
|
||||
properties::FloatProperty _orbitSpeedThreshold;
|
||||
properties::FloatProperty _spinSensitivity;
|
||||
properties::FloatProperty _zoomSensitivity;
|
||||
properties::FloatProperty _zoomSensitivityDistanceThreshold;
|
||||
properties::FloatProperty _zoomBoundarySphereMultiplier;
|
||||
properties::FloatProperty _inputStillThreshold;
|
||||
properties::FloatProperty _centroidStillThreshold;
|
||||
properties::BoolProperty _panEnabled;
|
||||
properties::FloatProperty _interpretPan;
|
||||
properties::FloatProperty _slerpTime;
|
||||
properties::IVec2Property _guiButton;
|
||||
properties::Vec4Property _friction;
|
||||
properties::FloatProperty _pickingRadiusMinimum;
|
||||
properties::BoolProperty _ignoreGui;
|
||||
|
||||
#ifdef TOUCH_DEBUG_PROPERTIES
|
||||
struct DebugProperties : PropertyOwner {
|
||||
DebugProperties();
|
||||
properties::StringProperty interactionMode;
|
||||
properties::IntProperty nFingers;
|
||||
properties::StringProperty interpretedInteraction;
|
||||
properties::FloatProperty normalizedCentroidDistance;
|
||||
properties::FloatProperty minDiff;
|
||||
properties::FloatProperty rollOn;
|
||||
} _debugProperties;
|
||||
|
||||
int pinchConsecCt = 0;
|
||||
double pinchConsecZoomFactor = 0;
|
||||
//int stepVelUpdate = 0;
|
||||
#endif
|
||||
|
||||
// Class variables
|
||||
VelocityStates _vel;
|
||||
|
||||
@@ -67,6 +67,7 @@ private:
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
|
||||
UniformCache(radius, transparency, thickness, color) _uniformCache;
|
||||
|
||||
std::vector<GLfloat> _vertexData;
|
||||
GLuint _quad = 0;
|
||||
GLuint _vertexPositionBuffer = 0;
|
||||
int _numFingers = 0;
|
||||
|
||||
@@ -104,7 +104,7 @@ class TuioEar : public TUIO::TuioListener {
|
||||
void clearInput();
|
||||
|
||||
private:
|
||||
bool _tap;
|
||||
bool _tap = false;
|
||||
TUIO::TuioCursor _tapCo = TUIO::TuioCursor(-1, -1, -1.0f, -1.0f);
|
||||
std::mutex _mx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user