Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 18 files). Show all
Unified · Split
| @@ -9,10 +9,12 @@ · 8 unmodified lines | ||
| 9 | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | 10 | // |
| 11 | 11 | |
| 12 | +#include <avatar/AvatarManager.h> | |
| 13 | +#include <avatar/MyAvatar.h> | |
| 14 | +#include <GLCanvas.h> | |
| 12 | 15 | #include <HandData.h> |
| 13 | 16 | #include <HFBackEvent.h> |
| 14 | 17 | |
| 15 | −#include "Application.h" | |
| 16 | 18 | #include "devices/MotionTracker.h" |
| 17 | 19 | #include "devices/SixenseManager.h" |
| 18 | 20 | #include "ControllerScriptingInterface.h" |
| @@ -41,7 +43,7 @@ void ControllerScriptingInterface::handleMetaEvent(HFMetaEvent* event) { · 22 unmodified lines | ||
| 41 | 43 | const PalmData* ControllerScriptingInterface::getPrimaryPalm() const { |
| 42 | 44 | int leftPalmIndex, rightPalmIndex; |
| 43 | 45 | |
| 44 | − const HandData* handData = Application::getInstance()->getAvatar()->getHandData(); | |
| 46 | + const HandData* handData = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHandData(); | |
| 45 | 47 | handData->getLeftRightPalmIndices(leftPalmIndex, rightPalmIndex); |
| 46 | 48 | |
| 47 | 49 | if (rightPalmIndex != -1) { |
| @@ -52,7 +54,7 @@ const PalmData* ControllerScriptingInterface::getPrimaryPalm() const { · 4 unmodified lines | ||
| 52 | 54 | } |
| 53 | 55 | |
| 54 | 56 | int ControllerScriptingInterface::getNumberOfActivePalms() const { |
| 55 | − const HandData* handData = Application::getInstance()->getAvatar()->getHandData(); | |
| 57 | + const HandData* handData = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHandData(); | |
| 56 | 58 | int numberOfPalms = handData->getNumPalms(); |
| 57 | 59 | int numberOfActivePalms = 0; |
| 58 | 60 | for (int i = 0; i < numberOfPalms; i++) { |
| @@ -64,12 +66,12 @@ int ControllerScriptingInterface::getNumberOfActivePalms() const { · 5 unmodified lines | ||
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | const PalmData* ControllerScriptingInterface::getPalm(int palmIndex) const { |
| 67 | − const HandData* handData = Application::getInstance()->getAvatar()->getHandData(); | |
| 69 | + const HandData* handData = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHandData(); | |
| 68 | 70 | return &handData->getPalms()[palmIndex]; |
| 69 | 71 | } |
| 70 | 72 | |
| 71 | 73 | const PalmData* ControllerScriptingInterface::getActivePalm(int palmIndex) const { |
| 72 | − const HandData* handData = Application::getInstance()->getAvatar()->getHandData(); | |
| 74 | + const HandData* handData = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHandData(); | |
| 73 | 75 | int numberOfPalms = handData->getNumPalms(); |
| 74 | 76 | int numberOfActivePalms = 0; |
| 75 | 77 | for (int i = 0; i < numberOfPalms; i++) { |