定義
TextureCoordinate {
exposedField MFVec2f point [] # (-,)
}
IndexedFaceSetや ElevationGridに
ImageTexture, MovieTextureまたは
PixelTextureを貼り付けるときに多面体を構成する頂点に対応する
テキスチャ上の2次元座標を指定します。
- point
- テキスチャ上の2次元座標の集合
サンプル
わかりやすいように一つ面しか持たないElevationGridを物体として
選んでいます。テキスチャ中での4つの座標が物体の4つの頂点上に
くるように変更されます。grid.gifはもとは格子ですが歪んで表示
されます。
#VRML V2.0 utf8
Shape {
geometry ElevationGrid {
xDimension 2
zDimension 2
height [0 0, 0 0]
texCoord TextureCoordinate { point [.1 .1, .5 .1, .1 .8, .8 .9] }
}
appearance Appearance {
texture ImageTexture { url ["grid.gif"] }
}
}
DEF Top Viewpoint {
position .5 10 .5
orientation 1 0 0 -1.57
description "Top"
}