5.66. TabFace (element)

<tabface> ‐ A table of faces in a subdivision (a mesh)

5.66.1. Attributes

NameTypeDefaults
sizeINTEGERNone (required)

5.66.2. Description

This element defines a table of faces in a subdivision, a set of faces with normals and texture coordinates.

The integer value size of the size attribute defines the number of faces contained in the table of faces. This element expects size faces in its scope.

5.66.3. Expected children

The following elements must occur in tabface: as many faces as the value of the size attribute. If the mesh is textured, as many facetextures as the value of the size attribute. If the mesh is colored, as many facecolors as the value of the size attribute.

5.66.4. Example

The example below defines a textured tabface with two faces. The first face is made with vertices of rank 1, 2, and 3 (the first three vertex elements in the tabvertex element that is not reported here). The ranks of the coordinate textures of the first face are 95, 2, and 96 (the textureCoord elements ranked 95, 2, and 96 in the tabtextureCoord element that is not reported here). The three vertices in the first face have the same normal: the second normal element in the tabnormal element that is not reported here.

<tabface size="2">
  <face index="1">
    1 2 3
  </face>
  <facetexture index="1">
    95 2 96
  </face>
  <facenormal index="1">
    2 2 2
  </facenormal>
  <face index="2">
    1 3 4
  </face>
  <facetexture index="2">
     95 96 29
  </face>
  <facenormal index="2">
     3 3 3
  </facenormal>
</tabface>

The example below defines a colored tabface with 10 faces. The first face is made with vertices of rank 1, 2, and 4 (the vertex elements ranked 1, 2 and 4 in the tabvertex element that is not reported here). The ranks of the colors of the first face are 1, 1, and 2 (the first and second color in the tabcolor element that is not reported here). The three vertices in the first face have the same normal: the first normal element in the tabnormal element that is not reported here.

<tabface size="10">
  <face index="1">
    1 2 4
  </face>
  <facecolor index="1">
    1 1 2
  </facecolor>
  <facenormal index="1">
    1 1 1
  </facenormal>
  ...
</tabface>