14 #ifndef OSG_MULTISWITCH
15 #define OSG_MULTISWITCH 1
18 #include <osgSim/Export>
43 virtual bool addChild(
osg::Node *child );
45 virtual bool insertChild(
unsigned int index,
osg::Node *child );
47 virtual bool removeChild(
osg::Node *child );
49 void setValue(
unsigned int switchSet,
unsigned int pos,
bool value);
51 bool getValue(
unsigned int switchSet,
unsigned int pos)
const;
53 void setChildValue(
const osg::Node* child,
unsigned int switchSet,
bool value);
55 bool getChildValue(
const osg::Node* child,
unsigned int switchSet)
const;
58 bool setAllChildrenOff(
unsigned int switchSet);
61 bool setAllChildrenOn(
unsigned int switchSet);
64 bool setSingleChildOn(
unsigned int switchSet,
unsigned int pos);
77 void setSwitchSetList(
const SwitchSetList& switchSetList);
83 void setValueList(
unsigned int switchSet,
const ValueList& values);
86 const ValueList&
getValueList(
unsigned int switchSet)
const {
return _values[switchSet]; }
88 void setValueName(
unsigned int switchSet,
const std::string& name);
90 const std::string&
getValueName(
unsigned int switchSet)
const {
return _valueNames[switchSet]; }
96 void expandToEncompassSwitchSet(
unsigned int switchSet);
unsigned int getActiveSwitchSet() const
std::vector< std::string > SwitchSetNameList
std::vector< bool > ValueList
#define META_Node(library, name)
const SwitchSetList & getSwitchSetList() const
const std::string & getValueName(unsigned int switchSet) const
void setActiveSwitchSet(unsigned int switchSet)
unsigned int _activeSwitchSet
void setNewChildDefaultValue(bool value)
const ValueList & getValueList(unsigned int switchSet) const
bool _newChildDefaultValue
bool getNewChildDefaultValue() const
SwitchSetNameList _valueNames
std::vector< ValueList > SwitchSetList