Showing the changes to interface/src/raypick/LaserPointerScriptingInterface.cpp (1 of 10 files). Show all
Unified · Split
| @@ -17,11 +17,6 @@ · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | #include "Application.h" | 18 | #include "Application.h" |
| 19 | 19 | ||
| 20 | LaserPointerScriptingInterface* LaserPointerScriptingInterface::getInstance() { | ||
| 21 | static LaserPointerScriptingInterface instance; | ||
| 22 | return &instance; | ||
| 23 | } | ||
| 24 | |||
| 25 | uint32_t LaserPointerScriptingInterface::createLaserPointer(const QVariant& properties) { | 20 | uint32_t LaserPointerScriptingInterface::createLaserPointer(const QVariant& properties) { |
| 26 | QVariantMap propertyMap = properties.toMap(); | 21 | QVariantMap propertyMap = properties.toMap(); |
| 27 | 22 | ||
| @@ -104,7 +99,7 @@ uint32_t LaserPointerScriptingInterface::createLaserPointer(const QVariant& prop · 76 unmodified lines | |||
| 104 | dirOffset = vec3FromVariant(propertyMap["dirOffset"]); | 99 | dirOffset = vec3FromVariant(propertyMap["dirOffset"]); |
| 105 | } | 100 | } |
| 106 | 101 | ||
| 107 | return LaserPointerManager::getInstance().createLaserPointer(jointName, posOffset, dirOffset, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled); | 102 | return DependencyManager::get<LaserPointerManager>()->createLaserPointer(jointName, posOffset, dirOffset, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled); |
| 108 | } else if (propertyMap["position"].isValid()) { | 103 | } else if (propertyMap["position"].isValid()) { |
| 109 | glm::vec3 position = vec3FromVariant(propertyMap["position"]); | 104 | glm::vec3 position = vec3FromVariant(propertyMap["position"]); |
| 110 | 105 | ||
| @@ -113,7 +108,7 @@ uint32_t LaserPointerScriptingInterface::createLaserPointer(const QVariant& prop · 2 unmodified lines | |||
| 113 | direction = vec3FromVariant(propertyMap["direction"]); | 108 | direction = vec3FromVariant(propertyMap["direction"]); |
| 114 | } | 109 | } |
| 115 | 110 | ||
| 116 | return LaserPointerManager::getInstance().createLaserPointer(position, direction, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled); | 111 | return DependencyManager::get<LaserPointerManager>()->createLaserPointer(position, direction, filter, maxDistance, renderStates, faceAvatar, centerEndY, enabled); |
| 117 | } | 112 | } |
| 118 | 113 | ||
| 119 | return 0; | 114 | return 0; |