Improved OSC control with TouchOSC

Added Looming source callback, and cleanup sync of sources. New horizontal version of OSCTouch UI.
This commit is contained in:
Bruno Herbelin
2021-12-25 16:05:43 +01:00
parent 7a551189d9
commit 3d05444f30
6 changed files with 126 additions and 64 deletions

View File

@@ -12,6 +12,7 @@ public:
typedef enum {
CALLBACK_GENERIC = 0,
CALLBACK_ALPHA,
CALLBACK_LOOM,
CALLBACK_DEPTH,
CALLBACK_PLAY,
CALLBACK_REPLAY,
@@ -56,6 +57,20 @@ public:
CallbackType type () override { return CALLBACK_ALPHA; }
};
class Loom : public SourceCallback
{
float speed_;
glm::vec2 pos_;
glm::vec2 step_;
float duration_;
float progress_;
public:
Loom(float da, float duration = 0.f);
void update(Source *s, float) override;
CallbackType type () override { return CALLBACK_LOOM; }
};
class SetDepth : public SourceCallback
{
float duration_;
@@ -92,7 +107,6 @@ class Grab : public SourceCallback
{
glm::vec2 speed_;
glm::vec2 start_;
glm::vec2 target_;
float duration_;
float progress_;
@@ -106,7 +120,6 @@ class Resize : public SourceCallback
{
glm::vec2 speed_;
glm::vec2 start_;
glm::vec2 target_;
float duration_;
float progress_;
@@ -120,7 +133,6 @@ class Turn : public SourceCallback
{
float speed_;
float start_;
float target_;
float duration_;
float progress_;