NASA-Tensegrity-Robotics-Toolkit / NTRTsim

The NASA Tensegrity Robotics Toolkit Simulator, a physics based simulator to research the design and control of tensegrity robots.
Apache License 2.0
162 stars 81 forks source link

Keyboard callbacks passed to tgModel #229

Open apsabelhaus opened 4 years ago

apsabelhaus commented 4 years ago

NTRT currently lacks a way to pass keyboard callbacks to our own custom applications (specifically, our tgModels), at least in the master branch.

I've implemented this functionality in the laika branch, specifically that callbacks are passed through tgSimViewGraphics to tgSimulation then down to models.

I'm opening this issue now for others who may be interested in similar functionality. I don't have time to merge it back into master (the laika branch has diverged significantly from master by now), but if someone wants to do the merge, it would be appreciated. The required changes to tgSimulation, tgSimViewGraphics, and tgModel are in commit 79a843db1823e628ecfd1d78024ee1db12cba140 in the laika branch.

Be careful when merging - only take the changes from those classes specifically. You'll break other people's code if you try to merge more of the laika branch back into master.