All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----dnx.util.DNXObject | +----dnx.lr.Node | +----dnx.lr.SubsidiaryNode | +----dnx.lr.GeometryNode | +----dnx.lr.node.ElevationGridNode
ElevationGrid { eventIn MFFloat set_height exposedField SFNode color NULL exposedField SFNode normal NULL exposedField SFNode texCoord NULL field MFFloat height [] field SFBool ccw TRUE field SFBool colorPerVertex TRUE field SFFloat creaseAngle 0 field SFBool normalPerVertex TRUE field SFBool solid TRUE field SFInt32 xDimension 0 field SFFloat xSpacing 0.0 field SFInt32 zDimension 0 field SFFloat zSpacing 0.0 }
The ElevationGrid 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 dimensions 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 = xSpacing * i P[i,j].y = height[ i + j * zDimension] P[i,j].z = zSpacing * j where 0<i<xDimension and 0<j<zDimension.
The set_height eventIn allows the height MFFloat field to be changed to allow animated ElevationGrids.
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 ElevationGrid. 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).
public SFNode colornormal
public SFNode normaltexCoord
public SFNode texCoordheight
public MFFloat heightccw
public SFBool ccwcolorPerVertex
public SFBool colorPerVertexcreaseAngle
public SFFloat creaseAnglenormalPerVertex
public SFBool normalPerVertexsolid
public SFBool solidxDimension
public SFInt32 xDimensionxSpacing
public SFFloat xSpacingzDimension
public SFInt32 zDimensionzSpacing
public SFFloat zSpacing
public ElevationGridNode()
protected void createNodeDefinition(NodeDefinition def)
protected void initFields()
public void render(NodeInstance inst, RenderTraversal traversal)
public int sendModelData(Model model)
public BoundingBox3 getCachedBoundingBox()
public void recomputeBoundingBox(BoundingBox3 box)
protected boolean boundingBoxHasChanged(Field f)
protected void handleEvent(SceneEvent ev)
All Packages Class Hierarchy This Package Previous Next Index