WPF中绘制3D线WPF

2023-09-07 22:28:38 作者:一口大奶兔

我工作的CAD应用程序和使用WPF渲染我的实体的想法。 但是,这似乎是WPF犯规支持绘制3D线。有没有办法在WPF中绘制3D线?我不喜欢创造一个网格,因为我要画,我恐怕每一个线下实体,这会导致对我来说是重要的表现挂钩,因为我必须在我的应用程序中创建线下实体的数量。 如果这是不可能通过WPF,才有可能做到这一点的DriectX 9或10?我可以在WPF混合的DirectX?我的意思是互操作性展示的某种方式?

I am working on a CAD application and thinking of using WPF for rendering my entities. But it seems like WPF doesnt support drawing 3D lines. Is there any ways for drawing 3D lines in WPF? I dont 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 DriectX 9 or 10? Can I mix directX in WPF? I mean some way of interops?

非常感谢,

推荐答案

WPF没有做3D,and它确实很好。

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

您需要使用的Viewport3D类创建3D。

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

由于WPF 3.5 SP1,您可以撰写的DirectX和WPF,这样你可以做相当复杂的3D应用程序。

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