SoSwitch Class Reference
[Groups]

Group node that traverses one chosen child. More...

#include <Inventor/nodes/SoSwitch.h>

Inheritance diagram for SoSwitch:
SoGroup SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject SoBlinker SoInteractiveSwitch

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoSwitch ()
 SoSwitch (int nChildren)

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFInt32 whichChild

Detailed Description

Group node that traverses one chosen child.

This group node traverses exactly one, none or all of its children. It implements an operation similar to the switch statement in C. One can use this node to switch on and off the effects of some properties, to switch between different properties, to switch between different geometry or to control the visibility of geometry.

The whichChild field specifies the index of the child to traverse, where the first child has index 0. There are several special values that can be used:

There are several extended versions of this node with additional/different behavior:

NOTES:

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch, SoMultiSwitch, SoInteractiveSwitch

See related examples:

InteractiveSwitch, MultiPathSwitch, MultiSwitch, PathSwitch, Medical4DVolumeRendering, MedicalAnatomicalViews, TutorialCombineColorMapping


Constructor & Destructor Documentation

SoSwitch::SoSwitch (  ) 

Creates a switch node with default settings.

SoSwitch::SoSwitch ( int  nChildren  ) 

Constructor that takes approximate number of children.


Member Function Documentation

static SoType SoSwitch::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoGroup.

Reimplemented in SoBlinker, and SoInteractiveSwitch.

virtual SoType SoSwitch::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoGroup.

Reimplemented in SoBlinker, and SoInteractiveSwitch.


Member Data Documentation

Index of the child to traverse, or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/