Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 49 files). Show all
Unified · Split
| @@ -167,31 +167,6 @@ void ControllerScriptingInterface::releaseInputController(controller::InputContr · 166 unmodified lines | |||
| 167 | _inputControllers.erase(input->getKey()); | 167 | _inputControllers.erase(input->getKey()); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | void ControllerScriptingInterface::update() { | ||
| 171 | static float last = secTimestampNow(); | ||
| 172 | float now = secTimestampNow(); | ||
| 173 | float delta = now - last; | ||
| 174 | last = now; | ||
| 175 | |||
| 176 | DependencyManager::get<UserInputMapper>()->update(delta); | ||
| 177 | |||
| 178 | bool jointsCaptured = false; | ||
| 179 | for (auto inputPlugin : PluginManager::getInstance()->getInputPlugins()) { | ||
| 180 | if (inputPlugin->isActive()) { | ||
| 181 | inputPlugin->pluginUpdate(delta, jointsCaptured); | ||
| 182 | if (inputPlugin->isJointController()) { | ||
| 183 | jointsCaptured = true; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 188 | for (auto entry : _inputControllers) { | ||
| 189 | entry.second->update(); | ||
| 190 | } | ||
| 191 | |||
| 192 | controller::ScriptingInterface::update(); | ||
| 193 | } | ||
| 194 | |||
| 195 | InputController::InputController(int deviceTrackerId, int subTrackerId, QObject* parent) : | 170 | InputController::InputController(int deviceTrackerId, int subTrackerId, QObject* parent) : |
| 196 | _deviceTrackerId(deviceTrackerId), | 171 | _deviceTrackerId(deviceTrackerId), |
| 197 | _subTrackerId(subTrackerId), | 172 | _subTrackerId(subTrackerId), |