14#ifndef OSG_MULTISWITCH
15#define OSG_MULTISWITCH 1
49 void setValue(
unsigned int switchSet,
unsigned int pos,
bool value);
51 bool getValue(
unsigned int switchSet,
unsigned int pos)
const;
88 void setValueName(
unsigned int switchSet,
const std::string& name);
The osgSim library is a NodeKit that extends the core scene graph to support nodes and drawables that...
Definition BlinkSequence:27
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
General group node which maintains a list of children.
Definition Group:29
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
virtual bool insertChild(unsigned int index, osg::Node *child)
Insert Node to Group at specific location.
virtual bool addChild(osg::Node *child)
Add Node to Group.
unsigned int _activeSwitchSet
Definition MultiSwitch:100
bool setSingleChildOn(unsigned int switchSet, unsigned int pos)
Set a single child to be on, MultiSwitch off all other children.
void setNewChildDefaultValue(bool value)
Definition MultiSwitch:39
const ValueList & getValueList(unsigned int switchSet) const
Get the a single set of different values for a particular switch set.
Definition MultiSwitch:86
SwitchSetList _values
Definition MultiSwitch:101
virtual bool removeChild(osg::Node *child)
Remove Node from Group.
virtual void traverse(osg::NodeVisitor &nv)
Traverse downwards : calls children's accept method with NodeVisitor.
void setValueList(unsigned int switchSet, const ValueList &values)
Set the a single set of different values for a particular switch set.
SwitchSetNameList _valueNames
Definition MultiSwitch:102
void setSwitchSetList(const SwitchSetList &switchSetList)
Set the compile set of different values.
std::vector< bool > ValueList
Definition MultiSwitch:72
bool getNewChildDefaultValue() const
Definition MultiSwitch:41
bool getValue(unsigned int switchSet, unsigned int pos) const
void setActiveSwitchSet(unsigned int switchSet)
Set which of the available switch set lists to use.
Definition MultiSwitch:67
const SwitchSetList & getSwitchSetList() const
Get the compile set of different values.
Definition MultiSwitch:80
std::vector< ValueList > SwitchSetList
Definition MultiSwitch:73
std::vector< std::string > SwitchSetNameList
Definition MultiSwitch:74
void setValueName(unsigned int switchSet, const std::string &name)
bool getChildValue(const osg::Node *child, unsigned int switchSet) const
virtual ~MultiSwitch()
Definition MultiSwitch:94
void expandToEncompassSwitchSet(unsigned int switchSet)
META_Node(osgSim, MultiSwitch)
bool _newChildDefaultValue
Definition MultiSwitch:99
MultiSwitch(const MultiSwitch &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
bool setAllChildrenOff(unsigned int switchSet)
Set all the children off (false), and set the new default child value to off (false).
unsigned int getActiveSwitchSet() const
Get which of the available switch set lists to use.
Definition MultiSwitch:70
const std::string & getValueName(unsigned int switchSet) const
Definition MultiSwitch:90
bool setAllChildrenOn(unsigned int switchSet)
Set all the children on (true), and set the new default child value to on (true).
void setValue(unsigned int switchSet, unsigned int pos, bool value)
void setChildValue(const osg::Node *child, unsigned int switchSet, bool value)
#define OSGSIM_EXPORT
Definition Export:38