在WPF线框渲染 [英] Wireframe rendering in WPF

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

问题描述

我必须写一个线框3D渲染器在一个大的WPF应用程序,做了很多事情,但WPF有这样做没有天生的能力。

I have to write a wireframe 3D renderer in a big WPF app that does many things But WPF has no native ability to do this.

有些人用3D工具WPF由微软,特别是其ScreenSpaceLines3D类。但在网络上大概有缓慢的性能和各种错误使用该类投诉,类库似乎并没有一直保持着自2007年以来!

Some people use "3D Tools for WPF" by Microsoft, specifically its ScreenSpaceLines3D class. But on the web there are complaints about slow performance and various bugs with that class, and the class library doesn't seem to have been maintained since 2007!

也有人建议从螺旋3D工具包的LinesVisual3D类,但显然这是越野车,太(<一href="http://helixtoolkit.$c$cplex.com/workitem/9957">http://helixtoolkit.$c$cplex.com/workitem/9957 )

Others have suggested the LinesVisual3D class from the Helix 3D toolkit, but apparently that's buggy, too ( http://helixtoolkit.codeplex.com/workitem/9957 )

查尔斯Petzold的拥有3D库 - ?没有人知道这是相当强大的。

Charles Petzold has a 3D library - does anyone know it's reasonably robust?

所以,做我有什么好的选择吗?例如,有没有好办法OpenGL3D在WPF窗口?有没有其他的好WPF库可以做到这一点可靠?

So do I have any good options here? For example, is there a good way to do OpenGL3D in a WPF window? Are there other good WPF libraries that can do this reliably?

在此先感谢。

推荐答案

查看SlimDX。 XNA和托管DirectX等正在德precated或旧。可能还要检查SharpDX我没有检查它在一段时间。我们使用SlimDX支持DirectX在.NET中,这是很好的。什么你可能看做的是使用SlimDX呈现在D3DImage为WPF互操作。另一种可能的选择是使用托管的WinForms控制和使用该手柄互操作与DirectX与SlimDX这可能会更快,但你失去了一些更方便的互操作与WPF的渲染引擎等,如果您使用D3DImage它成为一个的ImageBrush,你可以设置为任何事物的背景,你不必担心领空的问题等。

Check out SlimDX. XNA and Managed DirectX etc.. are deprecated or old. Possibly also check SharpDX i haven't checked it in a while. We use SlimDX for DirectX in .NET and it is good. What you are probably looking at doing is using SlimDX to render on a D3DImage for WPF interop. Another possible option is using a hosted WinForms control and using the handle of that to interop with DirectX with SlimDX which might be faster, but you lose some easier interop with WPF's rendering engine etc. If you use the D3DImage it becomes an ImageBrush that you can set as the background of anything and you do not have to worry about airspace issues etc.

编辑:哦,是的,由于某种原因,SlimDX没有他们在下载样了,但它们的来源$ C ​​$ c的样品,如果你下载它

oh yeah, for some reason SlimDX doesn't have their samples in the download anymore, but their source code has the samples if you download it.

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

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