UWP 渲染 3D 模型 [英] UWP render 3D model in a

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

问题描述

我正在编写一个从 .obj 文件加载模型的 C# 通用 Windows 应用程序,我想渲染该模型,以便用户可以旋转和缩放它.有没有办法在应用程序中呈现它?最好在同一个窗口?类似于 Map 控件,它包含在应用程序中,但仍具有交互性.

I'm writing a C# Universal Windows Application that loads a model from a .obj file and I would like to render that model so that the user can rotate it and scale it. Is there a way to render it in the app? Preferably in the same window? Something like the Map control, it's wrapped inside the app but still interactive.

推荐答案

我发现了这个 MSDN 文章,适用于 Windows 8.1 手机,告诉我们使用 平面投影.

I found this MSDN article for Windows 8.1 phone that tells us to use PlaneProjection.

 <StackPanel.Projection>        
    <PlaneProjection RotationX="-35" RotationY="-35" RotationZ="15"  />    
</StackPanel.Projection>  

DirectX 可能是加载 obj 文件的答案." DirectX 在加载 3D 模型时功能有限:建议使用 DirectXTK(工具包)来处理它们.它支持的 3D 模型文件格式是:.CMO、.SDKMESH 和 .VBO.它应该支持.OBJ 也是(如果我没记错的话)......"https://mva.microsoft.com/en-US/training-courses/c-directx-game-development-blending-and-models-8491?l=uG7SBIYz_8604984382

DirectX may be the answer to loading the obj file. " DirectX has limited features when it comes to loading a 3D model: It is recommended to use the DirectXTK (toolkit) to handle them. The 3D model file formats that it supports are: .CMO, .SDKMESH and .VBO. It should support .OBJ too (if my memory serves me well)...." https://mva.microsoft.com/en-US/training-courses/c-directx-game-development-blending-and-models-8491?l=uG7SBIYz_8604984382

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

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