Specifies a uniform rectangular grid of varying height in the XZ plane. More...
#include <Inventor/VRMLnodes/SoVRMLElevationGrid.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRMLElevationGrid () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFBool | ccw |
SoSFBool | solid |
SoSFFloat | creaseAngle |
See the VRML97 Specification, below.
NOTE: This class does not exist in Open Inventor 10.0 and later.This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org .
The SoVRMLElevationGrid node specifies a uniform rectangular grid of varying height in the XZ plane of the local coordinate system. The geometry is described by a scalar array of height values that specify the height of a rectangular surface above each point of the grid.
The xDimension and zDimension fields indicate the number of divisions of the grid height array in the X and Z directions. Both xDimension and zDimension must be > 1. The vertex locations for the rectangles are defined by the height field and the xSpacing and zSpacing fields:
Thus, the vertex corresponding to the point, P[ i, j], on the grid is placed at:
P[i,j].x = @I xSpacing @i * i P[i,j].y = @I height @i[ i + j * @I zDimension @i] P[i,j].z = @I zSpacing @i * j
where 0<i< xDimension and 0<j< zDimension .
The set_height eventIn allows the height MFFloat field to be changed to allow animated SoVRMLElevationGrids.
The default texture coordinates range from [0,0] at the first vertex to [1,1] at the last vertex. The S texture coordinate will be aligned with X, and the T texture coordinate with Z.
The colorPerVertex field determines whether colors (if specified in the color field) should be applied to each vertex or each quadrilateral of the SoVRMLElevationGrid. If colorPerVertex is FALSE and the color field is not NULL, then the color field must contain a Color node containing at least ( xDimension-1) *( zDimension-1) colors. If colorPerVertex is TRUE and the color field is not NULL, then the color field must contain a Color node containing at least xDimension * zDimension colors.
See the "Concepts - Geometry" for a description of the ccw, solid, and creaseAngle fields.
By default, the rectangles are defined with a counterclockwise ordering, so the Y component of the normal is positive. Setting the ccw field to FALSE reverses the normal direction. Backface culling is enabled when the ccw field and the solid field are both TRUE (the default).
NOTE: An elevation grid may not render or pick correctly if any of its polygons are self-intersecting or non-planar.
color | NULL |
normal | NULL |
texCoord | NULL |
height | [] |
ccw | TRUE |
colorPerVertex | TRUE |
creaseAngle | 0 |
normalPerVertex | TRUE |
solid | TRUE |
xDimension | 0 |
xSpacing | 0.0 |
zDimension | 0 |
zSpacing | 0.0 |
metadata | NULL |
SoMFFloat | set_height |
SoSFNode | set_color |
SoSFNode | set_normal |
SoSFNode | set_texCoord |
SoSFNode | set_metadata |
SoSFNode | color_changed |
SoSFNode | normal_changed |
SoSFNode | texCoord_changed |
SoSFNode | metadata_changed |
SoVRMLElevationGrid::SoVRMLElevationGrid | ( | ) |
Constructor.
static SoType SoVRMLElevationGrid::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVRMLGridShape.
Reimplemented in SoVRMLGeoElevationGrid.
virtual SoType SoVRMLElevationGrid::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVRMLGridShape.
Reimplemented in SoVRMLGeoElevationGrid.
Indicates whether the vertices are ordered in a counterclockwise direction when viewed from the outside (TRUE) or in a clockwise direction (FALSE).
Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.
If you know that the shape encloses a volume, set this value to TRUE.
Then backface culling will be performed.
NOTE: field available since Open Inventor 5.0NOTE 2: This field is not compatible with VRML97. If you specify a non-default value for this field, when this node is written to a VRML file, the file will contain this incompatible field and standard VRML97 file readers will not be able to read it.