TextureCoordinate2


Purpose:

This node is another of the eleven geometry and appearance property Nodes. This node defines a set of two-dimensional coordinates that will be used to map textures to any vertex-based PointSet, IndexedLineSet, or IndexedFaceSet objects that follow it in the scene graph.

Syntax

FILE FORMAT/DEFAULTS

TextureCoordinate2 {point 0 0 # MFVec2f}

Explanation

TextureCoordinate2 will replace the current texture coordinates in the rendering state for the shapes to use.

Texture coordinates will be between 0 and 1 and will range across the texture. The horizontal coordinate is always specified first followed by the vertical coordinate. The horizontal coordinate is named S. The vertical coordinate is named T.

Example Use

The following code fragment is from Floor.wrl.

TextureCoordinate2 {point [ 25 25, 25 0, 0 0, 0 25 ]}

See Also

MFVec2f