ygSwitch derived from ygNode Example Source Header

Description: toggles the child for node processing and Performer traversal

notes:
Category: Selection
Author: Dave Pape
11/01/01
06/28/05 Alex Hill - changed netOn variable to netOff for saving and printout
Revision: 02/01/06 Alex Hill - changed netOn to netOff and moved event generation out of app function

    Messages
on set the switch to on
off [bool] set the switch to off
toggle toggle the state of the switch
    Events
switchOn the switch has changed to on
switchOff the switch has changed to off
    Comments

constructor ygSwitch

1 create pfSwitch for the pfnode

destructor ~ygSwitch

method reset

1 if net master then set the switch to on

method message

1 set the switch to on
2 set the switch to off
3 toggle the state of the switch

method appTraverse

1 start timing
2 execute app method
3 if switch is on
3.1 call appTraverse recursively on all children
4 end timing

method isOn

method on

0.1 the switch has changed to on

method off

0.1 the switch has changed to off

method toggle