Recently I was coding some Kinect stuff and wanted to draw the skeleton that the user can see what’s going on. In the Samples there’s some code for that, but it’s pretty annoying to copy/paste it in your own project every time, so I wrapped it up in a class called SkeletonPainter.
To use it you just need an Image of either 640×480 or 320×240 and hand it over to the SkeletonPainter, along with the resolution and a background Brush of your choice:
SkeletonPainter painter = new SkeletonPainter(skeletonImage, SkeletonPainterResolution.Resolution320x240, Brushes.White);
Of course, you need to hand him the KinectSensor as well:
This way you can easily switch the KinectSensor while the painter is still active^
Have a try and tell me what you think =)