LineSet
Overview
LineSet is a geometry node that can contain a Coordinate or CoordinateDouble node and optionally a Color or ColorRGBA node.
The LineSet node belongs to the Rendering component and requires at least level 1, its default container field is geometry. It is available from X3D version 3.0 or higher.
Hierarchy
1
2
3
+ X3DNode
+ X3DGeometryNode
+ LineSet
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
MFInt32 [in, out] vertexCount [ ] [2,∞)
Vertices at a time.
MFNode [in, out] attrib [ ] [X3DVertexAttributeNode]
Single contained FloatVertexAttribute node that can specify list of per-vertex attribute information for programmable shaders.
Hint
SFNode [in, out] fogCoord NULL [FogCoordinate]
Single contained FogCoordinate node that can specify depth parameters for fog in corresponding geometry.
SFNode [in, out] color NULL [X3DColorNode]
Single contained Color or ColorRGBA node that can specify color values applied to corresponding vertices according to colorIndex and colorPerVertex fields.
SFNode [in, out] tangent NULL [Tangent] non standard
Input/Output field tangent. If there is no Tangent node, the MikkTSpace algorithm is used to generate tangent vectors.
SFNode [in, out] normal NULL [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. Normal vectors are rapidly computed at run time by GPUs and thus are rarely needed in model files if no special effects are expected.
SFNode [in, out] coord NULL [X3DCoordinateNode]
Single contained Coordinate or CoordinateDouble node that can specify a list of vertex values.
Advice
Hints
- Polygonal chain
- Either values in a contained Color node, or else Material emissiveColor in corresponding Appearance node, are used for rendering lines and points.
- Adding LineProperties to the corresponding Appearance node can modify the rendering style of these lines.
- 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.
- Insert a Shape node before adding geometry or Appearance.
- For advanced extensibility, authors can substitute a type-matched ProtoInstance node (with correct containerField value) for contained node content.
- Consider including Fog (with Fog color matching Background color) to provide further depth cueing for LineSet (LS).
Warnings
- Lines are not lit, are not texture-mapped, and do not participate in collision detection.
- Use a different color (or Material emissiveColor) than the Background color, otherwise geometry is invisible.