aboutsummaryrefslogtreecommitdiffstats
path: root/support/magicleap/Servo2D/code/inc/Servo2D.h
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2018-10-29 12:14:51 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2018-10-29 15:02:10 -0500
commitfc38c04313f377daaaa378172b940b971e220d5c (patch)
tree4e217f2958555fd44dce6468d3633f4e3681a65b /support/magicleap/Servo2D/code/inc/Servo2D.h
parent0ec0f705b66f1d527e24ddd5f99bd29e402a6bb0 (diff)
downloadservo-fc38c04313f377daaaa378172b940b971e220d5c.tar.gz
servo-fc38c04313f377daaaa378172b940b971e220d5c.zip
Get the ML port to follow hyperlinks
Diffstat (limited to 'support/magicleap/Servo2D/code/inc/Servo2D.h')
-rw-r--r--support/magicleap/Servo2D/code/inc/Servo2D.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/support/magicleap/Servo2D/code/inc/Servo2D.h b/support/magicleap/Servo2D/code/inc/Servo2D.h
index 866f2e09e6c..2f76c306e7c 100644
--- a/support/magicleap/Servo2D/code/inc/Servo2D.h
+++ b/support/magicleap/Servo2D/code/inc/Servo2D.h
@@ -5,6 +5,9 @@
#include <lumin/LandscapeApp.h>
#include <lumin/Prism.h>
#include <lumin/event/ServerEvent.h>
+#include <lumin/event/KeyInputEventData.h>
+#include <lumin/event/ControlTouchPadInputEventData.h>
+#include <lumin/node/QuadNode.h>
#include <lumin/resource/PlanarResource.h>
#include <SceneDescriptor.h>
@@ -88,9 +91,18 @@ protected:
* Handle events from the server
*/
virtual bool eventListener(lumin::ServerEvent* event) override;
+ bool touchpadEventListener(lumin::ControlTouchPadInputEventData* event);
+ bool keyEventListener(lumin::KeyInputEventData* event);
+
+ /**
+ * Get the current cursor position, with respect to the viewport.
+ */
+ glm::vec2 viewportCursorPosition();
+ bool pointInsideViewport(glm::vec2 pt);
private:
lumin::Prism* prism_ = nullptr; // represents the bounded space where the App renders.
lumin::PlanarResource* plane_ = nullptr; // the plane we're rendering into
+ lumin::QuadNode* content_node_ = nullptr; // the node containing the plane
ServoInstance servo_ = nullptr; // the servo instance we're embedding
};