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.
Comments
- Anonymous
May 29, 2006
Dan, you rock -- thanks for posting this!! - Anonymous
May 29, 2006
Oh baby, there goes my evening. - Anonymous
May 29, 2006
The comment has been removed - Anonymous
May 30, 2006
Nice work!
I was recently playing with your Trackball Class and thought it might be nice to back properties like EventSource with a dependency property, so you can play around in XAMLPad using only an assembly reference, but no code behind. - Anonymous
May 30, 2006
Daniel Lehenbauer published in his Blog a new version of his library....
Check here....
&nbsp... - Anonymous
May 30, 2006
Those lamenting the loss of ScreenSpaceLines3D -- count me as one of them as I used them in Sandbox3D... - Anonymous
May 30, 2006
Daniel Lehenbauer has posted an update for his 3D tools for WPF on GotDotNet. This version is compatible... - Anonymous
June 01, 2006
last two months I read no blogs -- this had to do with my moving 100% to Vista & office beta2, I...