Feature/touch fixes (#2463)

* Add Ceres to touch interaction list (Forgotten in previous commit. OBS! This list will be removed)

* Small code updates (Logical ordering of functions, code standard)

* Fix compilation issue when using debug define

* Make touch navigation abort idle behavior

* Make reset a trigger property

* Fix some broken property sliders (the default step size was too big)

* Update interaction monitor state on touch interaction with WebGui

* Add some documentation of what "LM" means, and make unit test a developer property
This commit is contained in:
Emma Broman
2023-02-01 12:44:34 +01:00
committed by GitHub
parent 6694c3e7ee
commit a0f9e88432
5 changed files with 186 additions and 161 deletions
+13 -5
View File
@@ -33,6 +33,7 @@
#include <openspace/properties/scalar/doubleproperty.h>
#include <openspace/properties/scalar/intproperty.h>
#include <openspace/properties/stringproperty.h>
#include <openspace/properties/triggerproperty.h>
#include <openspace/properties/vector/ivec2property.h>
#include <openspace/properties/vector/vec4property.h>
#include <array>
@@ -67,9 +68,16 @@ public:
TouchInteraction();
// for interpretInteraction()
enum Type { ROT = 0, PINCH, PAN, ROLL, PICK, ZOOM_OUT };
enum Type {
ROTATION = 0,
PINCH,
PAN,
ROLL,
PICK,
ZOOM_OUT
};
// Stores the velocity in all 6DOF
// Stores the velocity in all 6 DOF
struct VelocityStates {
glm::dvec2 orbit = glm::dvec2(0.0);
double zoom = 0.0;
@@ -146,7 +154,7 @@ private:
void decelerate(double dt);
// Resets all properties that can be changed in the GUI to default
void resetToDefault();
void resetPropertiesToDefault();
Camera* _camera = nullptr;
@@ -156,7 +164,7 @@ private:
properties::BoolProperty _touchActive;
properties::BoolProperty _disableZoom;
properties::BoolProperty _disableRoll;
properties::BoolProperty _reset;
properties::TriggerProperty _reset;
properties::IntProperty _maxTapTime;
properties::IntProperty _deceleratesPerSecond;
properties::FloatProperty _touchScreenSize;
@@ -194,7 +202,7 @@ private:
int pinchConsecCt = 0;
double pinchConsecZoomFactor = 0;
//int stepVelUpdate = 0;
int stepVelUpdate = 0;
#endif
std::array<TouchInputHolder, 2> _pinchInputs;
// Class variables