Jump to: navigation, search
IndexedTriangleFanSet : X3DComposedGeometryNode {
  MFInt32 [in]     set_index       []   [0,∞) or -1
  SFNode  [in,out] color           NULL [X3DColorNode]
  SFNode  [in,out] coord           NULL [X3DCoordinateNode]
  SFNode  [in,out] metadata        NULL [X3DMetadataObject]
  SFNode  [in,out] normal          NULL [X3DNormalNode]
  SFNode  [in,out] texCoord        NULL [X3DTextureCoordinateNode]
  SFBool  []       ccw             TRUE
  SFBool  []       colorPerVertex  TRUE
  SFBool  []       normalPerVertex TRUE
  SFBool  []       solid           TRUE
  MFInt32 []       index           []   [0,∞) or -1

An IndexedTriangleFanSet represents a 3D shape composed of triangles that form a fan shape around the first vertex declared in each fan as depicted in <a href="#f-TriangleFanSet">Figure 11.1</a>. IndexedTriangleFanSet uses the indices in its index field to specify the triangle fans by connecting vertices from the coord field. An index of "1" indicates that the current fan has ended and the next one begins. The last fan may be (but does not have to be) followed by a "1".Each fan shall have at least three non-coincident vertices.

The IndexedTriangleFanSet node is specified in the local coordinate system and is affected by the transformations of its ancestors. Descriptions of the color, coord, normal, and texCoord fields are provided in the Color, Coordinate, Normal, and TextureCoordinate nodes, respectively. If values are provided for the color, normal and texCoord fields, the values are applied in the same manner as the values from the coord field and there shall be at least as many values as are present in the coord field. The value of the colorPerVertex field is ignored and always treated as TRUE. If the normal field is not provided, normals shall be generated as follows:

  • If normalPerVertex is TRUE, the normal for each vertex shall be the average of the normals for all triangles sharing that vertex.
  • If normalPerVertex is FALSE, the normal shall be generated for the current triangle based on the ccw field.

The solid field determines whether the IndexedTriangleFanSet is visible when viewed from the inside.

Authoring Tip

This node is designed for getting geometry to the graphics card very efficiently. You must provide normals for this to work right. The fallback paths without normals will not be nearly as fast.