Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 15 files). Show all
Unified · Split
| @@ -13,10 +13,12 @@ · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | #include <QtScript/QScriptContext> | 14 | #include <QtScript/QScriptContext> |
| 15 | 15 | ||
| 16 | #include <avatar/AvatarManager.h> | ||
| 16 | #include <display-plugins/DisplayPlugin.h> | 17 | #include <display-plugins/DisplayPlugin.h> |
| 17 | #include <display-plugins/CompositorHelper.h> | 18 | #include <display-plugins/CompositorHelper.h> |
| 18 | #include <OffscreenUi.h> | 19 | #include <OffscreenUi.h> |
| 19 | #include <avatar/AvatarManager.h> | 20 | #include <plugins/PluginUtils.h> |
| 21 | |||
| 20 | #include "Application.h" | 22 | #include "Application.h" |
| 21 | 23 | ||
| 22 | HMDScriptingInterface::HMDScriptingInterface() { | 24 | HMDScriptingInterface::HMDScriptingInterface() { |
| @@ -47,6 +49,14 @@ glm::vec2 HMDScriptingInterface::overlayToSpherical(const glm::vec2 & position) · 24 unmodified lines | |||
| 47 | return qApp->getApplicationCompositor().overlayToSpherical(position); | 49 | return qApp->getApplicationCompositor().overlayToSpherical(position); |
| 48 | } | 50 | } |
| 49 | 51 | ||
| 52 | bool HMDScriptingInterface::isHMDAvailable() { | ||
| 53 | return PluginUtils::isHMDAvailable(); | ||
| 54 | } | ||
| 55 | |||
| 56 | bool HMDScriptingInterface::isHandControllerAvailable() { | ||
| 57 | return PluginUtils::isHandControllerAvailable(); | ||
| 58 | } | ||
| 59 | |||
| 50 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { | 60 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { |
| 51 | glm::vec3 hudIntersection; | 61 | glm::vec3 hudIntersection; |
| 52 | auto instance = DependencyManager::get<HMDScriptingInterface>(); | 62 | auto instance = DependencyManager::get<HMDScriptingInterface>(); |