2016-04-09 151 views
1

我正在写一个C#通用Windows应用程序从.obj文件加载模型,我想呈现该模型,以便用户可以旋转和缩放它。有没有办法在应用中渲染它?最好在同一个窗口中?像Map控件一样,它被包裹在应用程序中,但仍然是交互式的。UWP渲染3D模型在

回答

1

我发现这个MSDN article为Windows 8.1手机,告诉我们使用PlaneProjection

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

DirectX may be the answer to loading the obj file。 “在加载3D模型时,DirectX的功能有限:建议使用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

+0

感谢您的这一点,但它并没有真正解决我的问题,我已经找到了解决方案,我可以做文件加载自己。请欣赏你的帮助。 –