<<VRML 2.0 - An Introductory view by examples

ElevationGrid

[elevation grid example]                              [run-example] 

This geometric node specifies a uniform regular grid of varying height in the y=0 plane of the local coordinate system. The grid is defined by an xDimension by zDimension array of scalar values defined by the parameter height (height has the data by row).

{
eventIn MFFloat set_height # input event for defining height

field SFBool solid TRUE # visibility of faces

field SFBool colorPerVertex TRUE#
exposedField SFNode color NULL # the color node

field SFBool normalPerVertex TRUE#
exposedField SFNode normal NULL # the normal node
field SFFloat creaseAngle 0 #
field SFBool ccw TRUE # normal orientation

exposedField SFNode texCoord NULL #

exposedField MFFloat height [ ] # (0,0) -> (xDimension-1,zDimension-1)
field SFInt32 xDimension 0 # number of rows - 1
field SFFloat xSpacing 1.0 # spacing in x-direction
field SFInt32 zDimension 0 # number of columns - 1
field SFFloat zSpacing 1.0 # spacing in z-direction
}


Usage :

Shape{
   geometry ElevationGrid {



                     }
      }