Nodes Home Page   Node Directory   Node Hierarchy

Shout3D Nodes Reference


TextureMapping


Introduction

The TextureMapping node holds texture mapping information for use in the textureMappings field of the MultiMesh node. (This is the same information provided directly in the corresponding fields of the IndexedFaceSet node.)

Link to Javadocs.


Fields

texCoord

NodeField texCoord

USAGE = TEXTURE_COORDINATE_NODE
DEFAULT = null

A TextureCoordinate node with a list of 2D texture coordinate to be applied to the vertices of the MultiMesh.


texCoordIndex

IntArrayField texCoordIndex

USAGE = INDEX_ARRAY
DEFAULT = {}

Used, optionally, to assign the texture coordinates in the texCoord field specific vertices for each polygon.

If the field is null or empty, texture coordinates are assigned to vertices using the indices in the coordIndex of the MultiMesh node directly. For example, assume that the coordIndex array begins [2 0 1 -1, ...] The first vertex for the first polygon will be assigned the third pair of texture coordinates in the texCoord array, the second vertex in the first polygon will be assigned the first pair of texture coordinates, and the third vertex in the first polygon will be assigned the second pair of texture coordinates.

If the field is not null or empty, the order of vertices in the coordIndex field is still used, but the texture coordinate pairs to be assigned are determined by the values in the texCoorIndex field. For example, a texCoordIndex array beginning [2 0 3 -1, ...] indicates that the third texture coordinate pair in the texCoord array is to be applied to the first vertex of first polygon specified in the coordIndex field of the MultiMesh node, the first texture coordinate pair is to be applied to the second vertex of the first polygon, and the fourth texture coordinate pair is to be applied to the third vertex of the first polygon.


Methods

onFieldChange

onFieldChange(Field theField, java.lang.Object userData)

XX


Notes


Copyright© 1999-2001, Shout3D LLC.