- Clean the classes declaration and body for DeviceTracker MotionTracker ControllerScriptingInterface / InputController Leapmotion - final bug remaining in the LeapOfFaith..js THe orientation assigned to the skeleton joints doesn't work even though all looks good.
Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 9 files). Show all
Unified · Split
| @@ -269,13 +269,13 @@ AbstractInputController* ControllerScriptingInterface::createInputController( co · 268 unmodified lines | ||
| 269 | 269 | } else { |
| 270 | 270 | |
| 271 | 271 | // Look for matching category |
| 272 | + // TODO in this current implementation, we just pick the first device assuming there is one ( normally the LeapMotion) | |
| 273 | + // in the near future we need to change that to a real mapping between the device names and the cateory | |
| 272 | 274 | int categoryID = 0; |
| 273 | 275 | MotionTracker* motionTracker = dynamic_cast< MotionTracker* > ( DeviceTracker::getDevice( categoryID ) ); |
| 274 | − if ( motionTracker ) | |
| 275 | − { | |
| 276 | + if ( motionTracker ) { | |
| 276 | 277 | int trackerID = motionTracker->findJointIndex( tracker.toStdString() ); |
| 277 | − if ( trackerID > 0 ) | |
| 278 | − { | |
| 278 | + if ( trackerID > 0 ) { | |
| 279 | 279 | AbstractInputController* inputController = new InputController(categoryID,trackerID, this ); |
| 280 | 280 | |
| 281 | 281 | _inputControllers.insert( InputControllerMap::value_type( inputController->getKey(), inputController ) ); |