H3D::TriangleFanSet Class Reference
[X3D node classes.]

A TriangleFanSet represents a 3D shape composed of triangles that form a fan shape around the first vertex declared in each fan. More...

#include <H3D/TriangleFanSet.h>

Inheritance diagram for H3D::TriangleFanSet:

Inheritance graph

List of all members.

Classes

class  AutoNormal
 Specialized field for automatically generating normals from coordinates. More...
class  InvalidFanCount
 Thrown when fanCount value is < 3. More...
class  NotEnoughColors
 Thrown if the number of colors in the color field is less than the number coordinates in the coord field. More...
class  NotEnoughTextureCoordinates
 Thrown if the number of texture coordinates in the color field is less than the number coordinates in the coord field. More...

Public Types

typedef CoordBoundField SFBound
 The bound field for TriangleFanSet is a CoordBoundField.

Public Member Functions

 TriangleFanSet (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< SFColorNode > _color=0, Inst< SFCoordinateNode > _coord=0, Inst< SFNormalNode > _normal=0, Inst< SFTextureCoordinateNode > _texCoord=0, Inst< SFBool > _ccw=0, Inst< SFBool > _colorPerVertex=0, Inst< SFBool > _normalPerVertex=0, Inst< SFBool > _solid=0, Inst< MFVertexAttributeNode > _attrib=0, Inst< AutoNormal > _autoNormal=0, Inst< MFInt32 > _fanCount=0, Inst< SFFogCoordinate > _fogCoord=0)
 Constructor.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
virtual void render ()
 Renders the TriangleFanSet with OpenGL.
virtual int nrTriangles ()
 An upper bound of the number of triangles renderered in this geometry.

Public Attributes

auto_ptr< AutoNormalautoNormal
 Auto-generated normals that are used if the normal field is NULL.
auto_ptr< MFInt32fanCount
 The fanCount field describes how many vertices are to be used in each fan from the coordinate field.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

A TriangleFanSet represents a 3D shape composed of triangles that form a fan shape around the first vertex declared in each fan.

The fanCount field describes how many vertices are to be used in each fan from the coordinate field. Coordinates are assigned to each fan by taking fanCount[n] vertices from the coordinate field. Each value of the fanCount array shall be greater than or equal to three. It shall be an error to have a value less than three.

The TriangleFanSet node is specified in the local coordinate system and is affected by the transformations of its ancestors. If values are provided for the color, normal, and texCoord fields, 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, for each fan, the normal shall be generated as follows:

Internal routes:
TriangleFanSet.dot

Member Function Documentation

void TriangleFanSet::traverseSG ( TraverseInfo ti  )  [virtual]

Traverse the scenegraph.

A HAPIHapticShape is added for haptic rendering if haptics is enabled.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented from H3D::X3DGeometryNode.

References H3D::X3DComposedGeometryNode::solid, and H3D::X3DGeometryNode::useBackFaceCulling().


Member Data Documentation

Auto-generated normals that are used if the normal field is NULL.

Only accessable in C++.

TriangleFanSet_autoNormal.dot

Referenced by render(), and TriangleFanSet().

The fanCount field describes how many vertices are to be used in each fan from the coordinate field.

Coordinates are assigned to each fan by taking fanCount[n] vertices from the coordinate field. Each value of the fanCount array shall be greater than or equal to three. It shall be an error to have a value less than three.

Access type: inputOutput

TriangleFanSet_fanCount.dot

Referenced by render(), and TriangleFanSet().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:19 2008 for H3D API by  doxygen 1.5.7