osg.Switch¶
-
class
osg.Switch¶ Represents: c++ class Wraps: osg::Switch Bases: osg.Grouposg.Switchis a Group node that allows switching between children. Typical uses would be for objects which might need to be rendered differently at different times, for instance a switch could be used to represent the different states of a traffic light.Constructors:
-
osg.Switch()¶
Methods:
-
:
insertChild(unsigned index, osg.Node node)¶ -
Parameters: - index (
unsigned) – - node (
osg.Node) –
Return type: bool - index (
-
:
insertChild(unsigned index, osg.Node node, bool val) -
Parameters: - index (
unsigned) – - node (
osg.Node) – - val (
bool) –
Return type: bool - index (
-
:
removeChildren(unsigned pos, unsigned count)¶ -
Parameters: - pos (
unsigned) – - count (
unsigned) –
Return type: bool - pos (
-
:
setValue(unsigned index, bool val)¶ -
Parameters: - index (
unsigned) – - val (
bool) –
- index (
-
:
getValue(unsigned index)¶ -
Parameters: index ( unsigned) –Return type: bool
-
:
setAllChildrenOff()¶ Set all the children off (
false), and set the new default child value to off (false).Return type: bool
-
:
setAllChildrenOn()¶ Set all the children on (
true), and set the new default child value to on (true).Return type: bool
-
:
setSingleChildOn(unsigned pos)¶ Set a single child on, switch off all other children.
Parameters: pos ( unsigned) –Return type: bool
-