Package org.web3d.x3d.sai.Rendering
Interface LineSet
- All Superinterfaces:
X3DGeometryNode
,X3DNode
- All Known Implementing Classes:
LineSet
LineSet is a geometry node that can contain a Coordinate|CoordinateDouble node and optionally a Color|ColorRGBA node.
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.
LineSet node tooltip: [X3DGeometryNode] LineSet is a geometry node that can contain a Coordinate|CoordinateDouble node and optionally a Color|ColorRGBA node.
- Hint: Polygonal chain https://en.wikipedia.org/wiki/Polygonal_chain
- Hint: either values in a contained Color node, or else Material emissiveColor in corresponding Appearance node, are used for rendering lines and points.
- Warning: lines are not lit, are not texture-mapped, and do not participate in collision detection.
- Warning: use a different color (or Material emissiveColor) than the Background color, otherwise geometry is invisible.
- Hint: adding LineProperties to the corresponding Appearance node can modify the rendering style of these lines.
- Hint: step-wise variation or linear interpolation of color values can be used as a good scientific visualization technique to map arbitrary function values to a color map.
- 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.
- Hint: consider including Fog (with Fog color matching Background color) to provide further depth cueing for LineSet (LS).
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.getColor()
Provide org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) using RGB values [0..1] from inputOutput SFNode field color.getCoord()
Provide org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) from inputOutput SFNode field coord.Provide org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) from inputOutput SFNode field fogCoord.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.int[]
Provide array of int results within allowed range of [2,infinity) from inputOutput MFInt32 field named vertexCount.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.setColor
(X3DColorNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) to inputOutput SFNode field color.setCoord
(X3DCoordinateNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) to inputOutput SFNode field coord.setFogCoord
(FogCoordinate newValue) Accessor method to assign org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) to inputOutput SFNode field fogCoord.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.setVertexCount
(int[] newValue) Accessor method to assign int array to inputOutput MFInt32 field named vertexCount.
-
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:
LineSet
- 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
-
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 colorIndex and colorPerVertex fields. *- 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 colorIndex and colorPerVertex fields. *- Parameters:
newValue
- is new value for the color field.- Returns:
LineSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCoord
X3DCoordinateNode getCoord()Provide org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) from inputOutput SFNode field coord.
Tooltip: [X3DCoordinateNode] Single contained Coordinate or CoordinateDouble node that can specify a list of vertex values. *- Returns:
- value of coord field
-
setCoord
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) to inputOutput SFNode field coord.
Tooltip: [X3DCoordinateNode] Single contained Coordinate or CoordinateDouble node that can specify a list of vertex values. *- Parameters:
newValue
- is new value for the coord field.- Returns:
LineSet
- 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:
LineSet
- 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:
LineSet
- 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:
LineSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getVertexCount
int[] getVertexCount()Provide array of int results within allowed range of [2,infinity) from inputOutput MFInt32 field named vertexCount.
Tooltip: [2,+infinity) vertexCount describes how many vertices are used in each individual polyline segment from the Coordinate point values. Coordinate point values are assigned as a block of points to each line by taking vertexCount[n] vertices at a time. *- Returns:
- value of vertexCount field
-
setVertexCount
Accessor method to assign int array to inputOutput MFInt32 field named vertexCount.
Tooltip: [2,+infinity) vertexCount describes how many vertices are used in each individual polyline segment from the Coordinate point values. Coordinate point values are assigned as a block of points to each line by taking vertexCount[n] vertices at a time. *- Parameters:
newValue
- is new value for the vertexCount field.- Returns:
LineSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-