#include <ElevationGrid.h>
Inheritance diagram for H3D::ElevationGrid:

Public Types | |
|
typedef DependentSFNode< X3DColorNode, FieldRef< X3DGeometricPropertyNode, Field,&X3DColorNode::propertyChanged > > | SFColorNode |
| The SFColorNode is dependent on the propertyChanged field of the contained X3DColorNode. | |
|
typedef DependentSFNode< X3DNormalNode, FieldRef< X3DGeometricPropertyNode, Field,&X3DNormalNode::propertyChanged > > | SFNormalNode |
| The SFNormalNode is dependent on the propertyChanged field of the contained X3DNormalNode. | |
|
typedef DependentSFNode< X3DTextureCoordinateNode, FieldRef< X3DGeometricPropertyNode, Field,&X3DTextureCoordinateNode::propertyChanged > > | SFTextureCoordinateNode |
| The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoordinateNode. | |
|
typedef DependentMFNode< X3DVertexAttributeNode, FieldRef< X3DGeometricPropertyNode, Field,&X3DVertexAttributeNode::propertyChanged > > | MFVertexAttributeNode |
| The MFVertexAttributeNode is dependent on the propertyChanged field of the contained X3DVertexAttributeNode. | |
Public Member Functions | |
| virtual void | startTexGen (TextureCoordinateGenerator *tex_coord_gen) |
| Start texture coordinate generation. | |
| virtual void | stopTexGen (TextureCoordinateGenerator *tex_coord_gen) |
| Stop texture coordinate generation. | |
| virtual void | renderTexCoord (int index, X3DTextureCoordinateNode *tc) |
| Render the texure coordinate with the given index from the tc argument. | |
| virtual void | renderTexCoord (const Vec3f &tc) |
| Render the given texure coordinate. | |
| virtual void | renderTexCoordArray (X3DTextureCoordinateNode *tc) |
| Render the X3DTextureCoordinate as an array. | |
| virtual void | disableTexCoordArray (X3DTextureCoordinateNode *tc) |
| Disable the arrays that were enabled in renderTexCoordArray(). | |
| virtual void | render () |
| Render the ElevationGrid with OpenGL. | |
| ElevationGrid (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< SFColorNode > _color=0, Inst< SFNormalNode > _normal=0, Inst< SFTextureCoordinateNode > _texCoord=0, Inst< SFBool > _ccw=0, Inst< SFBool > _colorPerVertex=0, Inst< SFBool > _normalPerVertex=0, Inst< SFBool > _solid=0, Inst< MFVertexAttributeNode > _attrib=0, Inst< AutoNormal > _autoNormal=0, Inst< SFFloat > _creaseAngle=0, Inst< SFInt32 > _xDimension=0, Inst< SFInt32 > _zDimension=0, Inst< SFFloat > _xSpacing=0, Inst< SFFloat > _zSpacing=0, Inst< MFFloat > _height=0) | |
| Constructor. | |
Public Attributes | |
| auto_ptr< SFColorNode > | color |
| Contains an X3DColorNode whose colors are applied to the ElevationGrid. | |
| auto_ptr< SFNormalNode > | normal |
| Contains an X3DNormalNode which colors are applied to the ElevationGrid. | |
| auto_ptr< SFTextureCoordinateNode > | texCoord |
| Contains an X3DTextureCoordinateNode which colors are applied to the ElevationGrid. | |
| auto_ptr< SFBool > | ccw |
| The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations. | |
| auto_ptr< SFBool > | colorPerVertex |
| If TRUE the colors in the color field is applied per vertex, otherwise it is applied per face. | |
| auto_ptr< SFBool > | normalPerVertex |
| If TRUE the normals in the normal field is applied per vertex, otherwise it is applied per face. | |
| auto_ptr< SFBool > | solid |
| The solid field determines whether one or both sides of each polygon shall be displayed. | |
| auto_ptr< MFVertexAttributeNode > | attrib |
| If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per-vertex attribute information for programmable shaders. | |
| auto_ptr< SFFloat > | creaseAngle |
| The creaseAngle field affects how default normals are generated. | |
| auto_ptr< SFInt32 > | xDimension |
| The number of elements in the grid height array in the x direction. | |
| auto_ptr< SFInt32 > | zDimension |
| The number of elements in the grid height array in the x direction. | |
| auto_ptr< SFFloat > | xSpacing |
| The distance between vertices in the x direction. | |
| auto_ptr< SFFloat > | zSpacing |
| The distance between vertices in the z direction. | |
| auto_ptr< MFFloat > | height |
| The height field is an xDimension by zDimension array of scalar values representing the height above the grid for each vertex. | |
| auto_ptr< AutoNormal > | autoNormal |
| Auto-generated normals that are used if the normal field is NULL. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Classes | |
| class | AutoNormal |
| Specialized field for automatically generating normals from coordinates. More... | |
| class | DisplayList |
| Display list is extended in order to set front sidedness of triangles outside the display list. More... | |
| class | SFBound |
| SFBound is specialized update itself from the fields of the ElevationGrid. More... | |
The geometry is described by a scalar array of height values that specify the height of a surface above each point of the grid.
The xDimension and zDimension fields indicate the number of elements of the grid height array in the X and Z directions. Both xDimension and zDimension shall be greater than or equal to zero. If either the xDimension or the zDimension is less than two, the ElevationGrid contains no quadrilaterals. The vertex locations for the rectangles are defined by the height field and the xSpacing and zSpacing fields:
The color field specifies per-vertex or per-quadrilateral colours for the ElevationGrid node depending on the value of colorPerVertex. If the color field is NULL, the ElevationGrid node is rendered with the overall attributes of the Shape node enclosing the ElevationGrid node).
The colorPerVertex field determines whether colours specified in the color field are applied to each vertex or each quadrilateral of the ElevationGrid node. If colorPerVertex is FALSE and the color field is not NULL, the color field shall specify a Color node containing at least (xDimension-1)×(zDimension-1) colours; one for each quadrilateral.
If colorPerVertex is TRUE and the color field is not NULL, the color field shall specify a Color node containing at least xDimension × zDimension colours, one for each vertex.
The normal field specifies per-vertex or per-quadrilateral normals for the ElevationGrid node. If the normal field is NULL, normals are automatically generated, using the creaseAngle field to determine if and how normals are smoothed across the surface(see Section 11.2.3 in the X3D specification).
The normalPerVertex field determines whether normals are applied to each vertex or each quadrilateral of the ElevationGrid node depending on the value of normalPerVertex. If normalPerVertex is FALSE and the normal node is not NULL, the normal field shall specify a Normal node containing at least (xDimension-1)×(zDimension-1) normals; one for each quadrilateral
If normalPerVertex is TRUE and the normal field is not NULL, the normal field shall specify a Normal node containing at least xDimension × zDimension normals; one for each vertex.
The texCoord field specifies per-vertex texture coordinates for the ElevationGrid node. If texCoord is NULL, default texture coordinates are applied to the geometry. The default texture coordinates range from (0,0) at the first vertex to (1,1) at the last vertex. The S texture coordinate is aligned with the positive X-axis, and the T texture coordinate with positive Z-axis. If texCoord is not NULL, it shall specify a TextureCoordinate node containing at least (xDimension)×(zDimension) texture coordinates; one for each vertex.
By default, the quadrilaterals are defined with a counterclockwise ordering. Hence, the Y-component of the normal is positive. Setting the ccw field to FALSE reverses the normal direction. Backface culling is enabled when the solid field is TRUE.
|
|
Render the given texure coordinate. If the currently active texture is a MultiTexture the texture coordinate will be rendered for the texture units of all textures in MultiTexture. tc must not be NULL. |
|
||||||||||||
|
Render the texure coordinate with the given index from the tc argument. If the currently active texture is a MultiTexture the texture coordinate will be rendered for the texture units of all textures in MultiTexture. tc must not be NULL. |
|
|
Render the X3DTextureCoordinate as an array. If the currently active texture is a MultiTexture it will be rendered for the texture units of all textures in MultiTexture. tc must not be NULL. |
|
|
Start texture coordinate generation. Texture coordinates will be generated for all texture units used by the currently active texture. If tex_coord_gen is NULL then texture coordinates will be generated from the bounding box of the geometry as defined in the X3D specification. If tex_coord_gen is not NULL then we use the TextureCoordinateGenerator to define the texture coordinate generation. |
|
|
If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per-vertex attribute information for programmable shaders.
Access type: inputOutput
|
|
|
Auto-generated normals that are used if the normal field is NULL. Only accessable in C++.
|
|
|
The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations. If ccw is TRUE, the normals shall follow the right hand rule; the orientation of each normal with respect to the vertices (taken in order) shall be such that the vertices appear to be oriented in a counterclockwise order when the vertices are viewed (in the local coordinate system of the Shape) from the opposite direction as the normal. If ccw is FALSE, the normals shall be oriented in the opposite direction. If normals are not generated but are supplied using a Normal node, and the orientation of the normals does not match the setting of the ccw field, results are undefined.
Access type: inputOutput
|
|
|
Contains an X3DColorNode whose colors are applied to the ElevationGrid. If the color field is NULL, the geometry shall be rendered normally using the Material and texture defined in the Appearance node
Access type: inputOutput
|
|
|
If TRUE the colors in the color field is applied per vertex, otherwise it is applied per face.
Access type: inputOutput
|
|
|
The creaseAngle field affects how default normals are generated. If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.
Access type: inputOutput
|
|
|
The height field is an xDimension by zDimension array of scalar values representing the height above the grid for each vertex.
Access type: inputOutput
|
|
|
Contains an X3DNormalNode which colors are applied to the ElevationGrid. If the normal field is NULL, the normals are automatically generated in accordance with the node's definition. If the node does not define a behaviour, the default is to generate an averaged normal for all faces that share that vertex.
Access type: inputOutput
|
|
|
If TRUE the normals in the normal field is applied per vertex, otherwise it is applied per face.
Access type: inputOutput
|
|
|
The solid field determines whether one or both sides of each polygon shall be displayed. If solid is FALSE, each polygon shall be visible regardless of the viewing direction (i.e., no backface culling shall be done, and two sided lighting shall be performed to illuminate both sides of lit surfaces). If solid is TRUE, back face culling will be performed.
Access type: inputOutput
|
|
|
Contains an X3DTextureCoordinateNode which colors are applied to the ElevationGrid.
Access type: inputOutput
|
|
|
The number of elements in the grid height array in the x direction.
Access type: inputOutput
|
|
|
The distance between vertices in the x direction.
Access type: inputOutput
|
|
|
The number of elements in the grid height array in the x direction.
Access type: inputOutput
|
|
|
The distance between vertices in the z direction.
Access type: inputOutput
|
1.4.5