Texture2


Purpose:

This node is another of the eleven geometry and appearance property Nodes. The Texture2 node determines a texture map and then defines parameters for that map. It is this map that all subsequent shapes will be referred to as they are being rendered.

Syntax
WRAP	ENUM
REPEAT	Repeats texture outside 0-1 texture coordinate range
CLAMP	Clamps texture coordinates to lie within 0-1 range
FILE FORMAT/DEFAULTS
Texture2 {
	filename	""	# SFString
	image		0 0 0	# SFImage
	wrapS		REPEAT	# SFEnum
	wrapT		REPEAT	# SFEnum
}
Explanation

Using this node, a texture can be read from the URL listed by the filename field. Setting the filename field to an empty string ("") turns off the texturing.

Another way you can specify a texture you want is to set the image field to contain the texture data. Make sure you don't specify both a URL and data inline. This will result in undefined behavior in your world.

Example Use

The following code fragment is from Tower.wrl.

Texture2 { filename "tex27.bmp" }

See Also

SFEnum, SFImage, SFString