2016-04-09 149 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

感謝您的這一點,但它並沒有真正解決我的問題,我已經找到了解決方案,我可以做文件加載自己。請欣賞你的幫助。 –