I wanted to play around with some 3D controls in WPF, but was mildly surprised to find that there were no primitive solid controls in WPF - I just wanted to plop a few spheres and cubes in a scene, but didn't realize I had to render them using meshes.
Surely someone has created libraries of 3d primitives that can be added to WPF 3D scenes by now. Are any of these libraries free?
How about modeling tools? I know there are a few free modeling applications (like Blender), but is there a way to export models from these and include them in a WPF application?
Thanks!
Ab3d. PowerToys is an ultimate WPF and WinForms 3D toolkit library that greatly simplifies developing desktop applications with scientific, technical, CAD or other 3D graphics. The library has been proven in many professional applications.
To draw a line, create a Line element. Use its X1 and Y1 properties to set its start point; and use its X2 and Y2 properties to set its end point. Finally, set its Stroke and StrokeThickness because a line without a stroke is invisible. Setting the Fill element for a line has no effect, because a line has no interior.
Charles Petzold has written a library of basic 3D shapes for WPF that you can find here : http://www.charlespetzold.com/3D/
Admittedly, is comes with a weird license, but all in all it's rather cheap and you get a free book, which I recommend by the way ;)
I should add something else terribly, terribly important that I forgot to mention in my first post -- why are you looking at 3D controls? I looked at the link Thomas posted, and they have a 3D animated "knife switch" to replace a check box.
FOR THE LOVE OF ALL THAT IS PURE AND HOLY, do not foist that on a commercial desktop app! If you want to play with it, if you want to make childrens' software interesting or something, fine, great. But I just want to make sure you're not trying to "add punch" to your accounting package or something...
IMHO, Do not use Petzold Media 3D for primitives drawing. It works by unusual way for WPF 3D overriding OnDraw() method. It is not a right way. It is a good resource for learning some features, no more. Of course, there is great free library Helix 3D in codeplex. Any tool for 3D object creation is a good start. Take a look for a post 3D models fatures in WPF Good luck in WPF 3D! p.s. I like to draw 3D primitives by hand also...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With