Node that defines the style to use when rendering. More...
#include <Inventor/nodes/SoDrawStyle.h>
Public Types | |
enum | Style { FILLED = SoDrawStyleElement::FILLED, LINES = SoDrawStyleElement::LINES, POINTS = SoDrawStyleElement::POINTS, INVISIBLE = SoDrawStyleElement::INVISIBLE, MARKERS = SoDrawStyleElement::MARKERS } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoDrawStyle () | |
virtual void | setOverride (const SbBool state) |
virtual SbBool | isOverride () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFEnum | style |
SoSFFloat | pointSize |
SoSFFloat | lineWidth |
SoSFUShort | linePattern |
SoSFInt32 | linePatternScaleFactor |
Node that defines the style to use when rendering.
This node defines the current drawing style for all subsequent shape nodes in a scene graph. SoDrawStyle specifies how primitives should be rendered.
Draw style
The drawing style has no effect on picking or callback primitive generation. In particular, geometry with style INVISIBLE is not rendered but is still pickable. It can be useful to put, for example, an invisible sphere around an assembly to ensure that it is always picked as a unit.
Style INVISIBLE should generally not be used to "turn off" geometry. It is more efficient to put an SoSwitch node above the geometry and all its associated nodes. Using the Switch's whichChild field to "turn off" geometry avoids traversing any of the associated nodes.
Point size and line width notes
style | FILLED |
pointSize | 0 |
lineWidth | 0 |
linePattern | 0xffff |
linePatternScaleFactor | 1 |
SoLightModel, SoPickStyle, SoShapeHints
enum SoDrawStyle::Style |
SoDrawStyle::SoDrawStyle | ( | ) |
Creates a drawing style node with default settings.
static SoType SoDrawStyle::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoNode.
virtual SoType SoDrawStyle::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
virtual SbBool SoDrawStyle::isOverride | ( | ) | const [inline, virtual] |
Returns the state of the override field.
Reimplemented from SoNode.
virtual void SoDrawStyle::setOverride | ( | const SbBool | state | ) | [inline, virtual] |
Stipple pattern for lines (for LINES style).
This specifies how dashed or dotted lines will be drawn. The pattern is a 16-bit series of 0s and 1s and is repeated as necessary to stipple a given line. A 1 indicates that drawing occurs, and a 0 that it does not, on a pixel-by-pixel basis, starting with the low-order bits of the pattern. Values can range from 0 (invisible) to 0xffff (solid). Default is 0xffff.
The line pattern can be stretched using the linePatternScaleFactor field.
Stipple pattern scale factor (for LINES style).
It stretches the line pattern (see linePattern) by multiplying each subseries of consecutive 1s and 0s. Scale factors are clamped to lie between 1 and 255. Default is 1.
NOTE: field available since Open Inventor 4.0Width of lines (for LINES style).
The default line width is 0, meaning to use the default OpenGL value (1). Line widths greater than zero are considered to be specified in printer's points, where 1 inch = 72 printer's points. However the default pixels-per-inch value (managed by SbViewportRegion) is also 72. So effectively line width is specified in pixels unless the application sets a different pixels-per-inch value.
Please see the notes in the class description for more information.
Radius of points (for POINTS style).
Default is 0, meaning to use the default OpenGL value (1). Point sizes greater than zero are considered to be specified in printer's point, where 1 inch = 72 printer's points. However the default pixels-per-inch value (managed by SbViewportRegion) is also 72. So effectively point size is specified in pixels unless the application sets a different pixels-per-inch value.
Please see the notes in the class description for more information.
Drawing style.
Use enum Style. Default is FILLED.