UWP渲染3D模型 [英] UWP render 3D model in a
问题描述
我正在编写一个C#通用Windows应用程序,该程序从.obj文件中加载模型,并且我希望呈现该模型,以便用户可以旋转和缩放它。有没有办法在应用程序中呈现它?最好在同一个窗口中?类似于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电话,告诉我们使用 PlaneProjection 。
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/zh-CN/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屋!