public class SoDrawStyle extends SoNode
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
SbViewportRegion
) is also 72. So effectively point size and line width are specified in pixels unless the application specifically sets a different pixels-per-inch value.
SoDrawStyle
node will have a dependency on the SoViewportRegionElement
(for the pixels-per-inch value). As a result render caches may be invalidated when the viewport size changes, e.g. if the drawing window is resized.
File format/default:
DrawStyle {
style | FILLED |
pointSize | 0 |
lineWidth | 0 |
linePattern | 0xffff |
linePatternScaleFactor | 1 |
Action behavior:
SoGLRenderAction
, SoCallbackAction
Sets the current drawing style. Sets: SoDrawStyleElement
, SoPointSizeElement
, SoLineWidthElement
, SoLinePatternElement
.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoDrawStyle.Styles
Draw styles.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
FILLED
Deprecated.
Use
SoDrawStyle.Styles.FILLED instead. |
static int |
INVISIBLE
Deprecated.
Use
SoDrawStyle.Styles.INVISIBLE instead. |
SoSFUShort |
linePattern
Stipple pattern for lines (for LINES style).
|
SoSFInt32 |
linePatternScaleFactor
Stipple pattern scale factor (for LINES style).
|
static int |
LINES
Deprecated.
Use
SoDrawStyle.Styles.LINES instead. |
SoSFFloat |
lineWidth
Width of lines (for LINES style).
|
static int |
MARKERS
Deprecated.
Use
SoDrawStyle.Styles.MARKERS instead. |
static int |
POINTS
Deprecated.
Use
SoDrawStyle.Styles.POINTS instead. |
SoSFFloat |
pointSize
Radius of points (for POINTS style).
|
SoSFEnum<SoDrawStyle.Styles> |
style
Drawing style.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoDrawStyle()
Creates a drawing style node with default settings.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int FILLED
SoDrawStyle.Styles.FILLED
instead.@Deprecated public static final int LINES
SoDrawStyle.Styles.LINES
instead.@Deprecated public static final int POINTS
SoDrawStyle.Styles.POINTS
instead.@Deprecated public static final int INVISIBLE
SoDrawStyle.Styles.INVISIBLE
instead.@Deprecated public static final int MARKERS
SoDrawStyle.Styles.MARKERS
instead.public final SoSFEnum<SoDrawStyle.Styles> style
public final SoSFFloat pointSize
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.
public final SoSFFloat lineWidth
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.
public final SoSFUShort linePattern
The line pattern can be stretched using the linePatternScaleFactor
field.
public final SoSFInt32 linePatternScaleFactor
linePattern
) by multiplying each subseries of consecutive 1s and 0s. Scale factors are clamped to lie between 1 and 255. Default is 1.
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com