| 38 | } |
| 39 | |
| 40 | int main() { |
| 41 | osvr::clientkit::ClientContext context( |
| 42 | "com.osvr.exampleclients.AnalogCallback"); |
| 43 | |
| 44 | // This is just one of the paths: specifically, the Hydra's left |
| 45 | // controller's analog trigger. More are in the docs and/or listed on |
| 46 | // startup |
| 47 | osvr::clientkit::Interface analogTrigger = |
| 48 | context.getInterface("/controller/left/trigger"); |
| 49 | |
| 50 | analogTrigger.registerCallback(&myAnalogCallback, NULL); |
| 51 | |
| 52 | // Pretend that this is your application's mainloop. |
| 53 | for (int i = 0; i < 1000000; ++i) { |
| 54 | context.update(); |
| 55 | } |
| 56 | |
| 57 | std::cout << "Library shut down, exiting." << std::endl; |
| 58 | return 0; |
| 59 | } |
nothing calls this directly
no test coverage detected