All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----dnx.util.DNXObject | +----dnx.lr.Node | +----dnx.lr.SubsidiaryNode | +----dnx.lr.GeometryNode | +----dnx.lr.node.IndexedFaceSetNode
IndexedFaceSet { eventIn MFInt32 set_colorIndex eventIn MFInt32 set_coordIndex eventIn MFInt32 set_normalIndex eventIn MFInt32 set_texCoordIndex exposedField SFNode color NULL exposedField SFNode coord NULL exposedField SFNode normal NULL exposedField SFNode texCoord NULL field SFBool ccw TRUE field MFInt32 colorIndex [] field SFBool colorPerVertex TRUE field SFBool convex TRUE field MFInt32 coordIndex [] field SFFloat creaseAngle 0 field MFInt32 normalIndex [] field SFBool normalPerVertex TRUE field SFBool solid TRUE field MFInt32 texCoordIndex [] }
The IndexedFaceSet node represents a 3D shape formed by constructing faces (polygons) from vertices listed in the coord field. The coord field must contain a Coordinate node. IndexedFaceSet uses the indices in its coordIndex field to specify the polygonal faces. An index of -1 indicates that the current face has ended and the next one begins. The last face may (but does not have to be) followed by a -1. If the greatest index in the coordIndex field is N, then the Coordinate node must contain N+1 coordinates (indexed as 0-N). IndexedFaceSet is specified in the local coordinate system and is affected by parent transformations.
For descriptions of the coord, normal, and texCoord fields, see the Coordinate, Normal, and TextureCoordinate nodes.
See "Concepts - Lighting Model" for details on lighting equations and the interaction between textures, materials, and geometries.
If the color field is not NULL then it must contain a Color node, whose colors are applied to the vertices or faces of the IndexedFaceSet as follows:
If the normal field is NULL, then the browser should automatically generate normals, using creaseAngle to determine if and how normals are smoothed across shared vertices.
If the normal field is not NULL, then it must 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 colors to vertices/faces.
If the texCoord field is not NULL, then it must 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 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, then ties should 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. See the figure below for an illustration of default texture coordinates for a simple box shaped IndexedFaceSet with a bounding box with X dimension twice as large as the Z dimension which is twice as large as the Y dimension:
See the introductory "Concepts - Geometry" section for a description of the ccw, solid, convex, and creaseAngle fields.
public SFNode colorcoord
public SFNode coordnormal
public SFNode normaltexCoord
public SFNode texCoordccw
public SFBool ccwcolorIndex
public MFInt32 colorIndexcolorPerVertex
public SFBool colorPerVertexconvex
public SFBool convexcoordIndex
public MFInt32 coordIndexcreaseAngle
public SFFloat creaseAnglenormalIndex
public MFInt32 normalIndexnormalPerVertex
public SFBool normalPerVertexsolid
public SFBool solidtexCoordIndex
public MFInt32 texCoordIndex
public IndexedFaceSetNode()
protected void createNodeDefinition(NodeDefinition def)
protected void initFields()
public void render(NodeInstance inst, RenderTraversal traversal)
public int sendModelData(Model model)
public void recomputeBoundingBox(BoundingBox3 box)
protected boolean boundingBoxHasChanged(Field f)
protected void handleEvent(SceneEvent ev)
public void potentialChildCarryingFieldChange(Field f, Node newValue)
All Packages Class Hierarchy This Package Previous Next Index