ElevationGrid is a geometry node defining a rectangular height field, with default values for a 1m by 1m square at height 0. Vertices corresponding to ElevationGrid height values define quadrilaterals, which are placed above or below a flat surface.
The ElevationGrid node belongs to the Geometry3D component and its container field is geometry. It is available since X3D version 3.0 or later.
SFNode [in, out] metadata NULL [X3DMetadataObject]
Metadata are not part of the X3D world and not interpreted by the X3D browser, but they can be accessed via the ECMAScript interface.
SFInt32 [ ] xDimension [0,∞)
Number of elements in the height array along X direction.
SFInt32 [ ] zDimension [0,∞)
Number of elements in the height array along Z direction.
SFFloat [ ] xSpacing 1 (0,∞)
Meters distance between grid-array vertices along X direction.
Total horizontal x-axis distance equals (xDimension-1) * xSpacing.
SFFloat [ ] zSpacing 1 (0,∞)
Meters distance between grid-array vertices along Z direction.
Total lateral z-axis distance equals (zDimension-1) * zSpacing.
SFBool [ ] solid TRUE
Setting solid true means draw only one side of polygons (backface culling on), setting solid false means draw both sides of polygons (backface culling off).
If in doubt, use solid='false' for maximum visibility.
Default value true can completely hide geometry if viewed from wrong side!
SFBool [ ] ccw TRUE
Ccw = counterclockwise: ordering of vertex coordinates orientation.
Ccw false can reverse solid (backface culling) and normal-vector orientation.
SFFloat [ ] creaseAngle [0,∞)
CreaseAngle defines angle (in radians) for determining whether adjacent polygons are drawn with sharp edges or smooth shading. If angle between normals of two adjacent polygons is less than creaseAngle, smooth shading is rendered across the shared line segment.
CreaseAngle=0 means render all edges sharply, creaseAngle=3.14159 means render all edges smoothly.
SFBool [ ] colorPerVertex TRUE
Whether Color node color values are applied to each vertex (true) or per quadrilateral (false).
SFBool [ ] normalPerVertex TRUE
Whether Normal node vector values are applied to each vertex (true) or per quadrilateral (false).
MFNode [in, out] attrib [ ] [X3DVertexAttributeNode]
Input/Output field attrib.
SFNode [in, out] fogCoord NULL [FogCoordinate]
Input/Output field fogCoord.
SFNode [in, out] color NULL [X3DColorNode]
Input/Output field color.
SFNode [in, out] texCoord NULL [X3DTextureCoordinateNode]
Input/Output field texCoord.
SFNode [in, out] normal NULL [X3DNormalNode]
Input/Output field normal.
MFFloat [in, out] height [ ] (-∞,∞)
Grid array of height vertices with upward direction along +Y axis, with xDimension rows and zDimension columns.
Height array values are given in row-major order from left to right along X axis, then back to front along Z axis.
- The height array defines (xDimension-1)*(zDimension-1) quadrilaterals.
- Positive direction for normal of each triangle is on same side of the quadrilateral. Triangles are defined either counterclockwise or clockwise depending on value of ccw field.
- ElevationGrid can contain Color/ColorRGBA, Normal and TextureCoordinate nodes.
- Insert a Shape node before adding geometry or Appearance.
- You can also substitute a type-matched ProtoInstance node for contained content.
- Generated quadrilaterals can be nonplanar. Tessellation splits quadrilaterals into triangles along seam starting at initial vertex of the quadrilateral and proceeding to opposite vertex.