SoIndexedLineSet Class Reference
[Shapes]
Indexed polyline shape node.
More...
#include <Inventor/nodes/SoIndexedLineSet.h>
List of all members.
Detailed Description
Indexed polyline shape node.
This node represents a 3D shape formed by constructing a set of polylines from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.
SoIndexedLineSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the polylines. An index of SO_END_LINE_INDEX (-1) indicates that the current polyline has ended and the next one begins.
The coordinates of the line set are transformed by the current cumulative transformation.
The line width and pattern are controlled by fields in SoDrawStyle.
The lines are drawn with the current drawing style (SoDrawStyle), but drawing style FILLED is treated as LINES.
Treatment of the current material, normal and tangent binding is as follows:
- PER_PART binding specifies a material, normal or tangent for each segment of the line.
- PER_FACE binding specifies a material, normal or tangent for each polyline.
- PER_VERTEX specifies a material, normal or tangent for each vertex.
- The corresponding _INDEXED bindings are the same, but use the materialIndex, normalIndex or tangentIndex indices (see SoIndexedShape).
- The default material binding is OVERALL.
- The default normal and tangent bindings are PER_VERTEX_INDEXED
The current complexity value has no effect on the rendering of indexed line sets.
Shape Antialiasing type is SoShape::LINES.
Lighting:
- By default, lighting is enabled (SoLightModel model = PER_VERTEX_PHONG). But...
Unlike polygonal shapes, lighting will not be applied to line shapes unless the application explicitly sets normal vectors (using SoVertexProperty or SoNormal) or sets tangent vectors (using SoVertexProperty). Normal vectors are not automatically computed for line shapes.
- If lighting is enabled and tangent vectors are specified:
then normal vectors are ignored and lines are lighted using the Illuminated Stream Lines algorithm (Zöckler, Stalling & Hege, 1996) (http://www.zib.de/visual-publications/sources/src-1996/isl.pdf).
- If lighting is enabled and normal vectors are specified but not tangent vectors:
then lines are lighted using the same algorithm as polygonal shapes.
- Note the above discussion is specific to rendering of line shapes , e.g. this node.
If you render a polygonal shape, e.g. SoFaceSet, using LINES mode (SoDrawStyle), the rules for polygonal shapes apply (if lighting is enabled and no normal vectors were specified, then normal vectors are automatically computed by Open Inventor).
- NOTE: If you want to apply lighting in a shader, you must explicitly set normal or tangent vectors, otherwise lighting will be disabled for the line shape.
Limitations:
- The VBO (vertex buffer object) rendering model only allows one set of indices for a primitive. Therefore it is not possible to use VBO rendering (and performance may be lower) if indices are set in the materialIndex, normalIndex, tangentIndex or textureCoordIndex fields.
- Due to limitations of the VBO (vertex buffer object) rendering model, it is not possible to use VBO rendering (and performance may be lower) if either the normal binding, the tangent binding or the material binding is set to either PER_PART(_INDEXED) or PER_FACE(_INDEXED).
FILE FORMAT/DEFAULT
ACTION BEHAVIOR
SoGLRenderAction
Draws lines based on the current coordinates, normals, tangents, materials, drawing style, and so on.
SoRayPickAction
Picks lines based on the current coordinates and transformation. Details about the intersection are returned in an SoLineDetail.
SoGetBoundingBoxAction
Computes the bounding box that encloses all vertices of the line set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.
SoCallbackAction
If any line segment callbacks are registered with the action, they will be invoked for each successive segment in the line set.
SEE ALSO
SoCoordinate3, SoDrawStyle, SoFullSceneAntialiasing, SoLineDetail, SoLineSet, SoVertexProperty
- See related examples:
-
MedicalDTIViewer
Constructor & Destructor Documentation
SoIndexedLineSet::SoIndexedLineSet |
( |
|
) |
|
Creates an indexed line set node with default settings.
Member Function Documentation
static SoType SoIndexedLineSet::getClassTypeId |
( |
|
) |
[static] |
Returns the type identifier for this class.
Reimplemented from SoIndexedShape.
virtual SoType SoIndexedLineSet::getTypeId |
( |
|
) |
const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoIndexedShape.
The documentation for this class was generated from the following file: