H3D::IndexedLineSet Class Reference
[X3D node classes.]

The IndexedLineSet node represents a 3D geometry formed by constructing polylines from 3D vertices specified in the coord field. More...

#include <H3D/IndexedLineSet.h>

Inheritance diagram for H3D::IndexedLineSet:

Inheritance graph

List of all members.

Classes

class  InvalidColorIndex
 Thrown when the colorIndex field does not match the coordIndex field properly. More...
class  InvalidColorIndexSize
 Thrown when the colorIndex field's size does not match the coordIndex field properly. More...

Public Types

typedef DependentSFNode
< X3DCoordinateNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DCoordinateNode::propertyChanged > > 
SFCoordinateNode
 SFCoordinateNode is dependent on coordChanged field in X3DCoordinateNode.
typedef DependentSFNode
< X3DColorNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DColorNode::propertyChanged > > 
SFColorNode
 SFColorNode is dependent on colorChanged field in X3DColorNode.
typedef DependentSFNode
< FogCoordinate, FieldRef
< X3DGeometricPropertyNode,
Field,&FogCoordinate::propertyChanged > > 
SFFogCoordinate
 The SFFogCoordinate is dependent on the propertyChanged field of the contained FogCoordinate.

Public Member Functions

 IndexedLineSet (Inst< SFNode > _metadata=0, Inst< CoordBoundField > _bound=0, Inst< DisplayList > _displayList=0, Inst< MFInt32 > _set_colorIndex=0, Inst< MFInt32 > _set_coordIndex=0, Inst< SFColorNode > _color=0, Inst< SFCoordinateNode > _coord=0, Inst< MFInt32 > _colorIndex=0, Inst< SFBool > _colorPerVertex=0, Inst< MFInt32 > _coordIndex=0, Inst< SFFogCoordinate > _fogCoord=0)
 Constructor.
virtual int nrLines ()
 The number of lines rendered by this geometry.
virtual void render ()
 Render the IndexedLineSet with OpenGL.
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the geometry.

Public Attributes

auto_ptr< MFInt32set_colorIndex
 Field for setting the value of the colorIndex field.
auto_ptr< MFInt32set_coordIndex
 Field for setting the value of the coordIndex field.
auto_ptr< SFColorNodecolor
 Contains an X3DColorNode which colors are applied to the X3DComposedGeometryNode.
auto_ptr< SFCoordinateNodecoord
 The coord field specifies the 3D vertices of the line set and contains a X3DCoordinateNode.
auto_ptr< MFInt32colorIndex
 Indices into the color field.
auto_ptr< SFBoolcolorPerVertex
 If TRUE the colors in the color field are applied per vertex, otherwise it is applied per polyline.
auto_ptr< MFInt32coordIndex
 Indices into the coord field.
auto_ptr< SFFogCoordinatefogCoord
 If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculating fog depth.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase instance for this node.


Detailed Description

The IndexedLineSet node represents a 3D geometry formed by constructing polylines from 3D vertices specified in the coord field.

IndexedLineSet uses the indices in its coordIndex field to specify the polylines by connecting vertices from the coord field. An index of "-1" indicates that the current polyline has ended and the next one begins. The last polyline may be (but does not have to be) followed by a "-1". IndexedLineSet is specified in the local coordinate system and is affected by the transformations of its ancestors.

The coord field specifies the 3D vertices of the line set and contains a X3DCoordinateNode.

Lines are not lit, are not texture-mapped, and do not participate in collision detection. The width of lines is implementation dependent and each line segment is solid (i.e., not dashed).

If the color field is not NULL, it shall contain a Color node. The colours are applied to the line(s) as follows:

If the color field is NULL and there is a Material defined for the Appearance affecting this IndexedLineSet, the emissiveColor of the Material shall be used to draw the lines.

Internal routes:
IndexedLineSet.dot

Member Typedef Documentation

SFColorNode is dependent on colorChanged field in X3DColorNode.

SFCoordinateNode is dependent on coordChanged field in X3DCoordinateNode.

The SFFogCoordinate is dependent on the propertyChanged field of the contained FogCoordinate.


Member Function Documentation

virtual bool H3D::IndexedLineSet::movingSphereIntersect ( H3DFloat  radius,
const Vec3f &  from,
const Vec3f &  to,
NodeIntersectResult &  result 
) [inline, virtual]

Detect collision between a moving sphere and the geometry.

Parameters:
radius The radius of the sphere
from The start position of the sphere
to The end position of the sphere.
result A struct containing various results of intersections such as which geometries intersected the moving sphere.
Returns:
true if intersected, false otherwise.

Reimplemented from H3D::X3DGeometryNode.


Member Data Documentation

Contains an X3DColorNode which colors are applied to the X3DComposedGeometryNode.

If the color field is NULL and there is a Material defined for the Appearance affecting this IndexedLineSet, the emissiveColor of the Material shall be used to draw the lines. If a color is not NULL colors are applied as described in the detailed description Access type: inputOutput

IndexedLineSet_color.dot

Referenced by IndexedLineSet(), and render().

Indices into the color field.

See Detailed description for details on how it is used.

Access type: inputOutput
Value range: [0,inf) or -1

IndexedLineSet_colorIndex.dot

Referenced by IndexedLineSet(), and render().

If TRUE the colors in the color field are applied per vertex, otherwise it is applied per polyline.

Access type: inputOutput
Default value: TRUE

IndexedLineSet_colorPerVertex.dot

Referenced by IndexedLineSet(), and render().

The coord field specifies the 3D vertices of the line set and contains a X3DCoordinateNode.

Access type: inputOutput

IndexedLineSet_coord.dot

Referenced by IndexedLineSet(), and render().

Indices into the coord field.

See Detailed description for details on how it is used.

Access type: inputOutput
Value range: [0,inf) or -1

IndexedLineSet_coordIndex.dot

Referenced by IndexedLineSet(), and render().

If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculating fog depth.

Access type: inputOutput

IndexedLineSet_fogCoord.dot

Referenced by IndexedLineSet(), and render().

Field for setting the value of the colorIndex field.

Access type: inputOnly

IndexedLineSet_set_colorIndex.dot

Referenced by IndexedLineSet().

Field for setting the value of the coordIndex field.

Access type: inputOnly

IndexedLineSet_set_coordIndex.dot

Referenced by IndexedLineSet().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:30:27 2008 for H3D API by  doxygen 1.5.7