<<VRML 2.0 - An Introductory view by examples

TextureCoordinate

[example]                                                [run] 

This node defines a set of 2D texture coordinates used by vertex-based geometry nodes (e.g. IndexedFaceSet, ElevationGrid) to map textures to vertices.

{
exposedField MFVec2f point [ ] # a set of 2D texture coordinates
}


Usage :

  geometry ElevationGrid {
        (parameters)

        texCoord TextureCoordinate{
                    point [ 0 0, 1 0, 1 .75, 1 1.5,
                            .25 .25, 1 0, .75 .75, 1 .9,
                            0 0, 1 2, 4 4.75, 6 5.5,
                            0 0, 1 0, 1 .75, 1 1.5,
                            0 0, 1 0, 1 .75, 1 1.5]
                                    }

        height [0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 5, 5, 5, 5, 3, 3, 3, 3]
        xDimension 4
        xSpacing 2.0
        zDimension 5
        zSpacing 2.0
                        }