Rendering C++ ActiveX Polhemus Events in C# Direct3D

Untitled-1.jpgI’ve finally gotten my z-buffers and DISP_FUNCTIONS straight such that I have a rather elegant bridge between the polhemus hardware and the C# Direct3D Application. I had basic 3d (shown in this video). Now, the “windowless” activex component fires a custom event when the stylus is depressed. The windowless activex component has a DISP_FUNCTION GetStylusPosition() that uses PDI’s LastPno to get the current position. The C# application can call GetStylusPosition() and can respond to a custom event. The video shows me moving the stylus down each axis and then drawing circles by the Z-axis. The video makes the render look slow, trust me 30fps is nice and smooth. The model to world transformations took a while to work out. The C# application uses a timer to render at 30 fps. This saves a lot of CPU compared to the Main(), OnPaint(), and OnIdle() render loops that you see in a lot of tutorials.

Comments are closed.