Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing 3D lines in WPF

Tags:

wpf

directx

3d

cad

I am working on a CAD application and thinking of using WPF for rendering my entities.

But it seems like WPF doesn't support drawing 3D lines. Is there any ways for drawing 3D lines in WPF?

I don't like to create a mesh for each line entity I need to draw as I am afraid, this would cause a major performance hitch for me as I would have to create number of line entities in my application.

If this is not possible through WPF, will it be possible to do this in DirectX 9 or 10? Can I mix DirectX in WPF? I mean some way of interop?

Many Thanks

like image 690
Ram Avatar asked Jan 21 '10 19:01

Ram


1 Answers

WPF does do 3D, and it does it well.

You'll need to use the Viewport3D class to create 3D.

As of WPF 3.5 SP1, you can compose DirectX and WPF so that you can do fairly sophisticated 3D applications.

like image 150
codekaizen Avatar answered Oct 14 '22 03:10

codekaizen