SoDrawStyle Class Reference
[Properties]

Node that defines the style to use when rendering. More...

#include <Inventor/nodes/SoDrawStyle.h>

Inheritance diagram for SoDrawStyle:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

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

Detailed Description

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

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoLightModel, SoPickStyle, SoShapeHints

See related examples:

LinePatternScaleFactorDemo, LinePatternScaleFactorTest


Member Enumeration Documentation

Draw styles.

Enumerator:
FILLED 

Draw filled regions.

LINES 

Draw only outlines (wireframe).

POINTS 

Draw points at vertices.

INVISIBLE 

Do not draw anything at all.

MARKERS 

Draw markers.


Constructor & Destructor Documentation

SoDrawStyle::SoDrawStyle (  ) 

Creates a drawing style node with default settings.


Member Function Documentation

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]

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.


Member Data Documentation

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.0

Width 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.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/