Looking for ScreenSpaceLines3D? -- 3D Tools v0.4 released

I have posted a new release of the 3D Tools for the Windows Presentation Foundation targeting the Beta 2 release of the WinFX runtime.  The big addition in this release is a community owned implementation of the ScreenSpaceLines3D class. 

ScreenSpaceLines3D is a 3D line primitive whose thickness is constant in 2D space post projection.*  This means that the lines do not become “skinnier” as they receded from a perspective camera.  ScreenSpaceLines3D are most frequently used to implement bounding boxes, wireframe mode, or visualization of normals for editors.  Occasionally they are used in 3D scenes to represent telephone wires and similar objects that are too thin to be rendered reliably under a perspective projection.

I also started a MathUtils class which contains some generally useful utility methods, such as getting the View/Projection matrices from any camera and a method which returns the 3D -> 2D transform (useful for positioning 2D content, like text labels, relative to 3D content.)  I’ve also added a wireframe mode to the ModelViewer sample to test ScreenSpaceLines3D.

The project has been refactored into just two assemblies: 3DTools.dll which contains the reusable runtime components and the ModelViewer.exe sample.  Enjoy!

* The name ScreenSpaceLines3D was a bit of a misnomer.  The lines were actually of constant thickness in the post-projective space of the Viewport3DVisual, not “device space” or “screen space” as the name implied.