简体   繁体   English

Helix Toolkit - obj submeshes

[英]Helix Toolkit - obj submeshes

I am using helix toolkit to import a OBJ file.我正在使用 helix 工具包导入 OBJ 文件。 The file has a 4 3d models inside.Here is the code i am using to import the OBJ该文件里面有 4 个 3d 模型。这是我用来导入 OBJ 的代码

Model3DGroup group;
    
ModelVisual3D loadedModel = new ModelVisual3D();
var mi = new ModelImporter();
group = mi.Load("../Model/Vec.3ds");

loadedModel.Content = group;

What i am trying to do is select the meshes inside the obj by name.我想要做的是按名称选择 obj 内的网格。 Names are v_a, v_b,v_c,v_d名称为 v_a、v_b、v_c、v_d

I just cant seem the select them.我似乎无法选择它们。

Looks like the Model3DGroup returned is a standard class:看起来返回的 Model3DGroup 是一个标准类:

http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.model3dgroup%28v=vs.110%29.aspx http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.model3dgroup%28v=vs.110%29.aspx

Try getting the "collection" by calling Children() on the group, and you should be able to access the models as individual elements of the collection, eg:尝试通过在组上调用 Children() 来获取“集合”,您应该能够将模型作为集合的单个元素访问,例如:

group.Children().ElementAt(0) 
group.Children().ElementAt(1)

Or similar calls.或者类似的电话。 You should be able to find some examples using Model3DGroup.您应该能够找到一些使用 Model3DGroup 的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM