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.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFUShort |
linePattern
Stipple pattern for lines (for LINES style).
|
SoSFInt32 |
linePatternScaleFactor
Stipple pattern scale factor (for LINES style).
|
SoSFFloat |
lineWidth
Width of lines (for LINES style).
|
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, getRenderEngineMode, 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, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
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 July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com