简体   繁体   English

如何使用 OpenGL 加载分层 model? [等候接听]

[英]How to load a hierarchical model with OpenGL? [on hold]

I have a model which has limbs that I would like to be able to move independently.我有一个 model 的四肢,我希望能够独立移动。 Apparently, the way of loading a model and splitting it into several parts is by using the vertex indices as opposed to the vertices themselves to draw the model.显然,加载 model 并将其拆分为几个部分的方法是使用顶点索引而不是顶点本身来绘制 model。 However, the loader supplied by our school does not take the vertex indices of the model;但是我校提供的加载器不取model的顶点索引; it only takes the vertices.它只需要顶点。

Is there a simple way of going around this issue?有没有解决这个问题的简单方法? Am I looking at this problem the wrong way?我是否以错误的方式看待这个问题?

Vertex index is its load order.顶点索引是它的加载顺序。 #1 is the first vertex... Ref Ed Catmul's mop. #1 是第一个顶点... Ref Ed Catmul 的拖把。 Movie BYU.电影比尤。 Maya.玛雅人。 Polygons instance vertices by index.按索引的多边形实例顶点。 .obj files from maya allow negative indices to reference the (current ) end of the vertex list.来自 maya 的 .obj 文件允许负索引引用顶点列表的(当前)结尾。 handy when intermixing vertices and polygons into local lines in a text file that can be cut and pasted... Doing this right is called bandwidth minimization and becomes important if your drawing machine can only reference a few vertices or it has a delete vertex command.在将顶点和多边形混合到可以剪切和粘贴的文本文件中的局部线中时很方便... 做到这一点称为带宽最小化,如果您的绘图机只能引用几个顶点或者它有一个删除顶点命令,它就变得很重要。 The openGL strip commands are examples. openGL 条命令是示例。 .stl is the worst file format because it doesn't reference vertices by index. .stl 是最差的文件格式,因为它不按索引引用顶点。 A triangle is just nine numbers.一个三角形只有九个数字。 The other end of the spectrum is a solid model.光谱的另一端是坚固的 model。

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

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