Package org.web3d.x3d.sai.Geometry3D
Interface ElevationGrid
- All Superinterfaces:
X3DGeometryNode
,X3DNode
- All Known Implementing Classes:
ElevationGrid
ElevationGrid is a geometry node defining a rectangular height field, with default values for a 1m by 1m square at height 0.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
ElevationGrid node tooltip: [X3DGeometryNode] 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.
- Hint: the height array defines (xDimension-1)*(zDimension-1) quadrilaterals.
- Warning: generated quadrilaterals can be nonplanar. Tessellation splits quadrilaterals into triangles along seam starting at initial vertex of the quadrilateral and proceeding to opposite vertex.
- Hint: 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.
- Hint: ElevationGrid can contain Color|ColorRGBA, Normal and TextureCoordinate nodes.
- Hint: insert a Shape node before adding geometry or Appearance.
- Hint: for advanced extensibility, authors can substitute a type-matched ProtoInstance node (with correct containerField value) for contained node content.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add array of child attrib nodes to array of existing nodes (if any).X3DNode[]
Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field attrib.boolean
getCcw()
Provide boolean value from initializeOnly SFBool field named ccw.getColor()
Provide org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) using RGB values [0..1] from inputOutput SFNode field color.boolean
Provide boolean value from initializeOnly SFBool field named colorPerVertex.float
Provide float value unit axis, angle (in radians) within allowed range of [0,infinity) from initializeOnly SFFloat field named creaseAngle.Provide org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) from inputOutput SFNode field fogCoord.float[]
Provide array of float results from initializeOnly MFFloat field named height.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.Provide org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) from inputOutput SFNode field normal.boolean
Provide boolean value from initializeOnly SFBool field named normalPerVertex.boolean
getSolid()
Provide boolean value from initializeOnly SFBool field named solid.Provide org.web3d.x3d.sai.Texturing.X3DSingleTextureCoordinateNode instance (using a properly typed node) from inputOutput SFNode field texCoord.int
Provide int value within allowed range of [0,infinity) from initializeOnly SFInt32 field named xDimension.float
Provide float value within allowed range of (0,infinity) from initializeOnly SFFloat field named xSpacing.int
Provide int value within allowed range of [0,infinity) from initializeOnly SFInt32 field named zDimension.float
Provide float value within allowed range of (0,infinity) from initializeOnly SFFloat field named zSpacing.void
Set single child attrib node, replacing prior array of existing nodes (if any).Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field attrib.setCcw
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named ccw.setColor
(X3DColorNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) to inputOutput SFNode field color.setColorPerVertex
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named colorPerVertex.setCreaseAngle
(float newValue) Accessor method to assign float value unit axis, angle (in radians) to initializeOnly SFFloat field named creaseAngle.setFogCoord
(FogCoordinate newValue) Accessor method to assign org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) to inputOutput SFNode field fogCoord.setHeight
(float[] newValue) Accessor method to assign float array to initializeOnly MFFloat field named height.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setNormal
(X3DNormalNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) to inputOutput SFNode field normal.setNormalPerVertex
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named normalPerVertex.setSolid
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named solid.setTexCoord
(X3DSingleTextureCoordinateNode newValue) Accessor method to assign org.web3d.x3d.sai.Texturing.X3DSingleTextureCoordinateNode instance (using a properly typed node) to inputOutput SFNode field texCoord.setXDimension
(int newValue) Accessor method to assign int value to initializeOnly SFInt32 field named xDimension.setXSpacing
(float newValue) Accessor method to assign float value to initializeOnly SFFloat field named xSpacing.setZDimension
(int newValue) Accessor method to assign int value to initializeOnly SFInt32 field named zDimension.setZSpacing
(float newValue) Accessor method to assign float value to initializeOnly SFFloat field named zSpacing.
-
Method Details
-
getAttrib
X3DNode[] getAttrib()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field attrib.
Tooltip: [X3DVertexAttributeNode] Single contained FloatVertexAttribute node that can specify list of per-vertex attribute information for programmable shaders.- Hint: X3D Architecture 32.2.2.4 Per-vertex attributes, https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html#Pervertexattributes
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Returns:
- value of attrib field
- See Also:
-
setAttrib
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field attrib.
Tooltip: [X3DVertexAttributeNode] Single contained FloatVertexAttribute node that can specify list of per-vertex attribute information for programmable shaders.- Hint: X3D Architecture 32.2.2.4 Per-vertex attributes, https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html#Pervertexattributes
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Parameters:
newValue
- is new value for the attrib field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addAttrib
Add array of child attrib nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Parameters:
newValue
- is new value array to be appended the attrib field.
-
setAttrib
Set single child attrib node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the attrib field
-
getCcw
boolean getCcw()Provide boolean value from initializeOnly SFBool field named ccw.
Tooltip: ccw defines clockwise/counterclockwise ordering of vertex coordinates, which in turn defines front/back orientation of polygon normals according to Right-Hand Rule (RHR).- Hint: a good debugging technique for problematic polygons is to try changing the value of ccw, which can reverse solid effects (single-sided backface culling) and normal-vector direction.
- Warning: consistent and correct ordering of left-handed or right-handed point sequences is important throughout the coord array of point values.
- Hint: clockwise https://en.wikipedia.org/wiki/Clockwise
- Returns:
- value of ccw field
-
setCcw
Accessor method to assign boolean value to initializeOnly SFBool field named ccw.
Tooltip: ccw defines clockwise/counterclockwise ordering of vertex coordinates, which in turn defines front/back orientation of polygon normals according to Right-Hand Rule (RHR).- Hint: a good debugging technique for problematic polygons is to try changing the value of ccw, which can reverse solid effects (single-sided backface culling) and normal-vector direction.
- Warning: consistent and correct ordering of left-handed or right-handed point sequences is important throughout the coord array of point values.
- Hint: clockwise https://en.wikipedia.org/wiki/Clockwise
- Parameters:
newValue
- is new value for the ccw field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getColor
X3DColorNode getColor()Provide org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) using RGB values [0..1] from inputOutput SFNode field color.
Tooltip: [X3DColorNode] Single contained Color or ColorRGBA node that can specify color values applied to corresponding vertices according to colorPerVertex field. *- Returns:
- value of color field
-
setColor
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) to inputOutput SFNode field color.
Tooltip: [X3DColorNode] Single contained Color or ColorRGBA node that can specify color values applied to corresponding vertices according to colorPerVertex field. *- Parameters:
newValue
- is new value for the color field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getColorPerVertex
boolean getColorPerVertex()Provide boolean value from initializeOnly SFBool field named colorPerVertex.
Tooltip: Whether Color node color values are applied to each point vertex (true) or per quadrilateral (false).- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Returns:
- value of colorPerVertex field
-
setColorPerVertex
Accessor method to assign boolean value to initializeOnly SFBool field named colorPerVertex.
Tooltip: Whether Color node color values are applied to each point vertex (true) or per quadrilateral (false).- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Parameters:
newValue
- is new value for the colorPerVertex field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCreaseAngle
float getCreaseAngle()Provide float value unit axis, angle (in radians) within allowed range of [0,infinity) from initializeOnly SFFloat field named creaseAngle.
Tooltip: [0,+infinity) 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.- Hint: creaseAngle=0 means render all edges sharply, creaseAngle=3.14159 means render all edges smoothly.
- Hint: radian units for angular measure https://en.wikipedia.org/wiki/Radian
- Returns:
- value of creaseAngle field
-
setCreaseAngle
Accessor method to assign float value unit axis, angle (in radians) to initializeOnly SFFloat field named creaseAngle.
Tooltip: [0,+infinity) 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.- Hint: creaseAngle=0 means render all edges sharply, creaseAngle=3.14159 means render all edges smoothly.
- Hint: radian units for angular measure https://en.wikipedia.org/wiki/Radian
- Parameters:
newValue
- is new value for the creaseAngle field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFogCoord
FogCoordinate getFogCoord()Provide org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) from inputOutput SFNode field fogCoord.
Tooltip: [FogCoordinate] Single contained FogCoordinate node that can specify depth parameters for fog in corresponding geometry. *- Returns:
- value of fogCoord field
-
setFogCoord
Accessor method to assign org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) to inputOutput SFNode field fogCoord.
Tooltip: [FogCoordinate] Single contained FogCoordinate node that can specify depth parameters for fog in corresponding geometry. *- Parameters:
newValue
- is new value for the fogCoord field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getHeight
float[] getHeight()Provide array of float results from initializeOnly MFFloat field named height.
Tooltip: Grid array of height vertices with upward direction along +Y axis, with xDimension rows and zDimension columns.- Hint: height array values are given in row-major order from left to right along X axis, then back to front along Z axis.
- Warning: height array values are not retained or available at run time since a browser is permitted to condense geometry.
- Hint: this field is not accessType inputOutput since X3D browsers might use different underlying geometric representations for high-performance rendering, and so output events are not appropriate.
- Returns:
- value of height field
-
setHeight
Accessor method to assign float array to initializeOnly MFFloat field named height.
Tooltip: Grid array of height vertices with upward direction along +Y axis, with xDimension rows and zDimension columns.- Hint: height array values are given in row-major order from left to right along X axis, then back to front along Z axis.
- Warning: height array values are not retained or available at run time since a browser is permitted to condense geometry.
- Hint: this field is not accessType inputOutput since X3D browsers might use different underlying geometric representations for high-performance rendering, and so output events are not appropriate.
- Parameters:
newValue
- is new value for the height field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DGeometryNode
- Specified by:
getMetadata
in interfaceX3DNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DGeometryNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getNormal
X3DNormalNode getNormal()Provide org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) from inputOutput SFNode field normal.
Tooltip: [X3DNormalNode] Single contained Normal node that can specify perpendicular vectors for corresponding vertices to support rendering computations, applied according to the normalPerVertex field.- Hint: useful for special effects. Normal vector computation by 3D graphics hardware is quite fast so adding normals to a scene is typically unnecessary.
- Warning: normal vectors increase file size, typically doubling geometry definitions.
- Returns:
- value of normal field
-
setNormal
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) to inputOutput SFNode field normal.
Tooltip: [X3DNormalNode] Single contained Normal node that can specify perpendicular vectors for corresponding vertices to support rendering computations, applied according to the normalPerVertex field.- Hint: useful for special effects. Normal vector computation by 3D graphics hardware is quite fast so adding normals to a scene is typically unnecessary.
- Warning: normal vectors increase file size, typically doubling geometry definitions.
- Parameters:
newValue
- is new value for the normal field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getNormalPerVertex
boolean getNormalPerVertex()Provide boolean value from initializeOnly SFBool field named normalPerVertex.
Tooltip: Whether Normal node vector values are applied to each point vertex (true) or per quadrilateral (false).- Hint: if no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.
- Returns:
- value of normalPerVertex field
-
setNormalPerVertex
Accessor method to assign boolean value to initializeOnly SFBool field named normalPerVertex.
Tooltip: Whether Normal node vector values are applied to each point vertex (true) or per quadrilateral (false).- Hint: if no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.
- Parameters:
newValue
- is new value for the normalPerVertex field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSolid
boolean getSolid()Provide boolean value from initializeOnly SFBool field named solid.
Tooltip: 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).- Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick).
- Warning: default value true can completely hide geometry if viewed from wrong side!
- Hint: if in doubt, use solid='false' for maximum visibility.
- Hint: accessType relaxed to inputOutput in order to support animation and visualization.
- Returns:
- value of solid field
-
setSolid
Accessor method to assign boolean value to initializeOnly SFBool field named solid.
Tooltip: 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).- Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick).
- Warning: default value true can completely hide geometry if viewed from wrong side!
- Hint: if in doubt, use solid='false' for maximum visibility.
- Hint: accessType relaxed to inputOutput in order to support animation and visualization.
- Parameters:
newValue
- is new value for the solid field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTexCoord
X3DSingleTextureCoordinateNode getTexCoord()Provide org.web3d.x3d.sai.Texturing.X3DSingleTextureCoordinateNode instance (using a properly typed node) from inputOutput SFNode field texCoord.
Tooltip: [X3DTextureCoordinateNode] Single contained TextureCoordinate, TextureCoordinateGenerator or MultiTextureCoordinate node that can specify coordinates for texture mapping onto corresponding geometry. *- Returns:
- value of texCoord field
-
setTexCoord
Accessor method to assign org.web3d.x3d.sai.Texturing.X3DSingleTextureCoordinateNode instance (using a properly typed node) to inputOutput SFNode field texCoord.
Tooltip: [X3DTextureCoordinateNode] Single contained TextureCoordinate, TextureCoordinateGenerator or MultiTextureCoordinate node that can specify coordinates for texture mapping onto corresponding geometry. *- Parameters:
newValue
- is new value for the texCoord field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getXDimension
int getXDimension()Provide int value within allowed range of [0,infinity) from initializeOnly SFInt32 field named xDimension.
Tooltip: (0,+infinity) Number of elements in the height array along X direction.- Hint: total horizontal x-axis distance equals (xDimension-1) * xSpacing.
- Warning: xDimension < 2 means that ElevationGrid contains no quadrilaterals.
- Returns:
- value of xDimension field
-
setXDimension
Accessor method to assign int value to initializeOnly SFInt32 field named xDimension.
Tooltip: (0,+infinity) Number of elements in the height array along X direction.- Hint: total horizontal x-axis distance equals (xDimension-1) * xSpacing.
- Warning: xDimension < 2 means that ElevationGrid contains no quadrilaterals.
- Parameters:
newValue
- is new value for the xDimension field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getXSpacing
float getXSpacing()Provide float value within allowed range of (0,infinity) from initializeOnly SFFloat field named xSpacing.
Tooltip: (0,+infinity) Meters distance between grid-array vertices along X direction.- Hint: total horizontal x-axis distance equals (xDimension-1) * xSpacing.
- Returns:
- value of xSpacing field
-
setXSpacing
Accessor method to assign float value to initializeOnly SFFloat field named xSpacing.
Tooltip: (0,+infinity) Meters distance between grid-array vertices along X direction.- Hint: total horizontal x-axis distance equals (xDimension-1) * xSpacing.
- Parameters:
newValue
- is new value for the xSpacing field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getZDimension
int getZDimension()Provide int value within allowed range of [0,infinity) from initializeOnly SFInt32 field named zDimension.
Tooltip: (0,+infinity) Number of elements in the height array along Z direction.- Hint: total horizontal z-axis distance equals (zDimension-1) * zSpacing.
- Warning: zDimension < 2 means that ElevationGrid contains no quadrilaterals.
- Returns:
- value of zDimension field
-
setZDimension
Accessor method to assign int value to initializeOnly SFInt32 field named zDimension.
Tooltip: (0,+infinity) Number of elements in the height array along Z direction.- Hint: total horizontal z-axis distance equals (zDimension-1) * zSpacing.
- Warning: zDimension < 2 means that ElevationGrid contains no quadrilaterals.
- Parameters:
newValue
- is new value for the zDimension field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getZSpacing
float getZSpacing()Provide float value within allowed range of (0,infinity) from initializeOnly SFFloat field named zSpacing.
Tooltip: (0,+infinity) Meters distance between grid-array vertices along Z direction.- Hint: total lateral z-axis distance equals (zDimension-1) * zSpacing.
- Returns:
- value of zSpacing field
-
setZSpacing
Accessor method to assign float value to initializeOnly SFFloat field named zSpacing.
Tooltip: (0,+infinity) Meters distance between grid-array vertices along Z direction.- Hint: total lateral z-axis distance equals (zDimension-1) * zSpacing.
- Parameters:
newValue
- is new value for the zSpacing field.- Returns:
ElevationGrid
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-