With only a small amount of code you can create an application that receives tracking data through the PST Client.
This example is a fully functional Classic SDK application that connects to the PST and prints tracking data to the command line.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include <stdio.h> #include "pstapi.h" #include "windows.h" int main(int ac, char** av) { int i, j, k; struct PSTSensor sensor; if (!pst_connect()) exit(1); for(k = 0; k < 1000; ++k) { while(pst_get_sensor(&sensor)) { printf("Pose for: %s\n", sensor.name); for(i = 0; i < 4; ++i) { for(j = 0; j < 4; ++j) { printf("%.2f ", sensor.pose[i * 4 + j]); } printf("\n"); } } Sleep(10); } pst_disconnect(); return 0; } |