#include <IndexedFaceSet.h>
Inheritance diagram for H3D::IndexedFaceSet:

Public Types | |
| typedef CoordBoundField | SFBound |
| The bound field for IndexedFaceSet is a CoordBoundField. | |
Public Member Functions | |
| H3D_VALUE_EXCEPTION (int, InvalidTexCoordIndex) | |
| H3D_VALUE_EXCEPTION (int, InvalidNormalIndex) | |
| H3D_VALUE_EXCEPTION (int, InvalidColorIndex) | |
| IndexedFaceSet (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< SFBool > _convex=0, Inst< SFFloat > _creaseAngle=0, Inst< MFInt32 > _set_colorIndex=0, Inst< MFInt32 > _set_coordIndex=0, Inst< MFInt32 > _set_normalIndex=0, Inst< MFInt32 > _set_texCoordIndex=0, Inst< MFInt32 > _colorIndex=0, Inst< MFInt32 > _coordIndex=0, Inst< MFInt32 > _normalIndex=0, Inst< MFInt32 > _texCoordIndex=0) | |
| Constructor. | |
| virtual X3DCoordinateNode * | getCoord () |
| virtual void | render () |
| Renders the IndexedFaceSet using GL_POLYGONs. | |
Public Attributes | |
| auto_ptr< MFInt32 > | set_colorIndex |
| Field for setting the value of the colorIndex field. | |
| auto_ptr< MFInt32 > | set_coordIndex |
| Field for setting the value of the coordIndex field. | |
| auto_ptr< MFInt32 > | set_normalIndex |
| Field for setting the value of the normalIndex field. | |
| auto_ptr< MFInt32 > | set_texCoordIndex |
| Field for setting the value of the texCoordIndex field. | |
| auto_ptr< MFInt32 > | colorIndex |
| Indices into the color field. | |
| auto_ptr< SFBool > | convex |
| The convex field indicates whether all polygons in the shape are convex. | |
| auto_ptr< MFInt32 > | coordIndex |
| Indices into the coord field. | |
| auto_ptr< SFFloat > | creaseAngle |
| The creaseAngle field affects how default normals are generated. | |
| auto_ptr< MFInt32 > | normalIndex |
| Indices into the normal field. | |
| auto_ptr< MFInt32 > | texCoordIndex |
| Indices into the texCoord field. | |
| auto_ptr< AutoNormal > | autoNormal |
| Auto-generated normals that are used if the normal field is NULL. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Classes | |
| class | AutoNormal |
| Specialized field for automatically generating normals from coordinates. More... | |
The coord field contains a Coordinate node that defines the 3D vertices referenced by the coordIndex field. IndexedFaceSet uses the indices in its coordIndex field to specify the polygonal faces by indexing into the coordinates in the Coordinate node. An index of "-1" indicates that the current face has ended and the next one begins. The last face may be (but does not have to be) followed by a "-1" index. If the greatest index in the coordIndex field is N, the Coordinate node shall contain N+1 coordinates (indexed as 0 to N). Each face of the IndexedFaceSet shall have:
Otherwise, The results are undefined.
The IndexedFaceSet node is specified in the local coordinate system and is affected by the transformations of its ancestors. Descriptions of the coord, normal, and texCoord fields are provided in the Coordinate, Normal, and TextureCoordinate nodes, respectively. Details on lighting equations and the interaction between color field, normal field, textures, materials, and geometries are provided in 11 Rendering component and 12 Shape component.
If the color field is not NULL, it shall contain a Color node whose colours are applied to the vertices or faces of the IndexedFaceSet as follows:
If the normal field is not NULL, it shall contain a Normal node whose normals are applied to the vertices or faces of the IndexedFaceSet in a manner exactly equivalent to that described above for applying colours to vertices/faces (where normalPerVertex corresponds to colorPerVertex and normalIndex corresponds to colorIndex). If the normal field is NULL, the browser shall automatically generate normals, using creaseAngle to determine if and how normals are smoothed across shared vertices (see Section 11.2.3 in the X3D specification).
If the texCoord field is not NULL, it shall contain a TextureCoordinate node. The texture coordinates in that node are applied to the vertices of the IndexedFaceSet as follows:
If the texCoord field is NULL, a default texture coordinate mapping is calculated using the local coordinate system bounding box of the shape. The longest dimension of the bounding box defines the S coordinates, and the next longest defines the T coordinates. If two or all three dimensions of the bounding box are equal, ties shall be broken by choosing the X, Y, or Z dimension in that order of preference. The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other. The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension and the R coordinate ranges between 0 and the ratio of the smallest dimension of the bounding box to the greatest dimension.
|
|
Auto-generated normals that are used if the normal field is NULL. Only accessable in C++.
|
|
|
Indices into the color field. See Detailed description for details on how it is used.
Access type: inputOutput
|
|
|
The convex field indicates whether all polygons in the shape are convex. A polygon is convex if it is planar, does not intersect itself, and all of the interior angles at its vertices are less than 180 degrees. Non planar and self intersecting polygons may produce undefined results even if the convex field is FALSE.
Access type: inputOutput
|
|
|
Indices into the coord field. See Detailed description for details on how it is used.
Access type: inputOutput
|
|
|
The creaseAngle field affects how default normals are generated. If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.
Access type: inputOutput
|
|
|
Indices into the normal field. See Detailed description for details on how it is used.
Access type: inputOutput
|
|
|
Field for setting the value of the colorIndex field. Access type: inputOnly
|
|
|
Field for setting the value of the coordIndex field. Access type: inputOnly
|
|
|
Field for setting the value of the normalIndex field. Access type: inputOnly
|
|
|
Field for setting the value of the texCoordIndex field. Access type: inputOnly
|
|
|
Indices into the texCoord field. See Detailed description for details on how it is used.
Access type: inputOutput
|
1.4.5