在WPF中创建3d模型的简单代码示例? [英] A simple code example to create a 3d model in WPF?

查看:81
本文介绍了在WPF中创建3d模型的简单代码示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个非常简单的代码示例来在WPF中创建一个3d模型。

你能给我这样的代码吗?



我想将代码添加到我的新WPF应用程序中并查看结果。

使其易于理解应该非常简单。

我需要用C#语言,不是XAML。



我不想在WPF中添加模型。

我想在WPF中创建它们,例如3d Ellipse或者3d立方体。

I need a very simple code example to create a 3d model in WPF.
Can you give me such the code?

I wanna add the code to my new WPF application and see a result.
It should be very simple to make it easy to understand.
I need it in C# language, not XAML.

I don't wanna add models into WPF.
I wanna create them in WPF, for example, 3d Ellipse or 3d Cube.

推荐答案

Zam3d是将3D模型转换为Xaml的绝佳工具。我高度推荐Petzold的书 http://www.charlespetzold.com/3D/index.html [ ^ ]
Zam3d is a great tool for converting 3D Models into Xaml. I highly recomend Petzold's book http://www.charlespetzold.com/3D/index.html[^]


看看在这里显示的简单示例: http://wpftutorial.net/IntroductionTo3D.html [ ^ ]



如果你使用GanesanSenthilvel建议3d你需要一些东西来创建你的模型......你的我不想在代码中做让你看起来有点愚蠢 - 以我提供的链接为例。如果你不能将xaml转换为代码(但为什么?),你不应该去3D WPF ...抱歉说。
Have a look at the simple example shown here: http://wpftutorial.net/IntroductionTo3D.html[^]

And as GanesanSenthilvel recommended if you work with 3d you "Need" something to create your models... Your "I wan't to do it in code" makes you look a little "dumb" - take the example form the link I provided. If you can't convert that xaml to code (but why?), you shouldn't go for 3d WPF... sorry to say that.


这篇关于在WPF中创建3d模型的简单代码示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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