![](/img/trans.png)
[英]Is there an efficient method to determine if any of the vertices of a MeshGeometryModel3D are visible in the viewport?
[英]How is a Scene Node bound to MeshGeometryModel3D with HelixToolKit
我可以使用 assimp 加載 model:
SceneNode _sceneModel = new Importer().Load(path).Root;
這似乎將幾何體加載到其單獨的網格中 - 例如,如果您在 Maya 中構建了一個帶有 Wall_1、Wall_2、Wall_3 等的房間。SceneNode 是某種包含所有網格的數據結構。
然后可以將單獨的網格放入一個數組中
geometry = _sceneModel.Traverse().Where(x => (x is MeshNode)).Select(m => ((MeshNode)m).Geometry).ToArray();
但最終我只想將 xml 中的整個幾何體(例如房子)綁定到
<MeshGeometryModel3D>
但不知道該怎么做。 我可以綁定一個幾何圖形,例如。 從幾何數組我可以綁定 geometry[1] 這可能代表一堵牆但無法鍛煉如何綁定整個事物。
謝謝
MeshGeometryModel3D 是 Mesh 節點(場景節點)的 wpf 包裝器。 如果只想顯示加載的 model,可以將根場景節點添加到 GroupNodeModel3D 中。 您可以在此處找到示例https://github.com/helix-toolkit/helix-toolkit/blob/2254fce0870a165352ccb888e2f3e17398751724/Source/Examples/WPF.SharpDX/FileLoadDemo/MainViewModel.cs#L128
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.