用来存储polygon(faces,edges,vertices)等部分的基本数据结构,这些数据结构而后被封装到polygonal shape nodes,这些节点构成maya的基本结构——dependency graph。html
Polygon components:node
polygon Mesh 由三种基本的component组成: 数组
1. Vertices数据结构
2. Edges:app
3. Faces:url
在这三种基础的polygon components之上还有2中附加的component:spa
5. Face-Vertices指针
6. UVscomponent
每个polygon mesh的vertices存储在一个数组中,数组的每一项为一个三维的浮点数指针,每一项对应一个vertexId,这个vertexId基于数组的index,edges和faces的索引都是基于这一个数组的索引。htm
边索引:polygon mesh的边存储在边数组中,每一条边由2个顶点组成,因此边数组的每一项为一个指向边结构的指针。边结构第一项的integer指向start vertex在顶点数组中的vertexId,第二项指向end vertex在顶点数组的顶点数组中的vertexId:
面数组:
polygonal mesh的面也所有被存储在一个数组中,每个面被描述为一个整数序列,每个整数表明一个edge的ID,因此它是基于边表上的。
第一个序列表明一个面的包围边,接下来的子序列表明了面当中全部的holes。
internal flags 标志了每一个序列的起止。
(1)face array:
(2)face index array(face offset array):
face-vertices:
相邻的面共享一些顶点,一般你须要对应于某一个面的顶点,从而与一样的处于另外一个面的同一个顶点进行区分,这就是face-vertices。
face-vertices是conceptual components,用来定义polygonal的特性(feature),例如color per vertex和UVs。face-vertices由face array和face index array来表示,每个face-vertices由一个faceid和一个vertexid共同构成
能够有faceid在face array中找到edges,而后每一个edgeid的start vertex就是由verticesid来对应的。
例子:
于是face array能够变为:
UVs:
UVs依赖于face-vertices的概念,UVs对应于2D的平面用来将texture映射到polygon surface上,The structure that holds UVs in Maya consists of two arrays:
The first array associates each face vertex with a given UVId or none at all if the face that the face-vertex belongs to is not mapped. Each UVId then corresponds to an index in the UV list that holds the 2D point (U and V float values) where the UV is situated on the UV space.:
The Polygonal shape node:
用来表示一个mesh,对应maya中的一个DG,The polygonal shape node holds four fundamental attributes: an inMesh, an outMesh, a cachedInMesh, and pnts (tweaks), as shown in the following illustration.