在 WPF 中绘制 3D 线 [英] Drawing 3D lines in WPF

查看:50
本文介绍了在 WPF 中绘制 3D 线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 CAD 应用程序并考虑使用 WPF 来呈现我的实体.

但是好像 WPF 不支持绘制 3D 线.有没有什么方法可以在 WPF 中绘制 3D 线条?

我不喜欢为我需要绘制的每个线实体创建一个网格,因为我担心,这会对我造成重大的性能问题,因为我必须在我的应用程序中创建许多线实体.

如果通过 WPF 无法做到这一点,是否可以在 DirectX 9 或 10 中做到这一点?我可以在 WPF 中混合 DirectX 吗?我的意思是某种互操作方式?

非常感谢

解决方案

WPF 做 3D,它做得很好.

您需要使用 Viewport3D 类来创建 3D.

从 WPF 3.5 SP1 开始,您可以组合 DirectX 和 WPF,以便您可以执行相当复杂的 3D 应用程序.

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

解决方案

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.

这篇关于在 WPF 中绘制 3D 线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆