CPolhemus ActiveX Relaying Events to Render
Using the techniques described earlier, I have the activex object recieving polhemus events and then firing them to the C# application as custom events. I’m only recieving one event from the polhemus WM_PI_RAWDATA_READY which is fired for each sample at 60Hz. I use every 20th frame (3Hz) to fire a “realtime” event. Then if the stylus button is depressed and it’s been more than 15 frames since the last stylus depress I fire a “stylus button” event. Both events send the XYZ cartesian coordinates as part of the event. Then I use some real simple bitmap double buffering and a Graphics object to render the coordinates as a string. You can watch the video by clicking on the thumbnail on the right. Next, get a 3D toolkit (likely Direct3D) to use the coordinates to render a scene.