Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osgSim::MultiSwitch Class Reference

Inheritance diagram for osgSim::MultiSwitch:

osg::Group osg::Node osg::Object osg::Referenced List of all members.

Public Types

typedef std::vector< bool > ValueList
typedef std::vector< ValueListSwitchSetList

Public Member Functions

 MultiSwitch ()
 MultiSwitch (const MultiSwitch &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgSim, MultiSwitch)
virtual void traverse (osg::NodeVisitor &nv)
void setNewChildDefaultValue (bool value)
bool getNewChildDefaultValue () const
virtual bool addChild (osg::Node *child)
virtual bool insertChild (unsigned int index, osg::Node *child)
virtual bool removeChild (osg::Node *child)
void setValue (unsigned int switchSet, unsigned int pos, bool value)
bool getValue (unsigned int switchSet, unsigned int pos) const
void setChildValue (const osg::Node *child, unsigned int switchSet, bool value)
bool getChildValue (const osg::Node *child, unsigned int switchSet) const
bool setAllChildrenOff (unsigned int switchSet)
bool setAllChildrenOn (unsigned int switchSet)
bool setSingleChildOn (unsigned int switchSet, unsigned int pos)
void setActiveSwitchSet (unsigned int switchSet)
unsigned int getActiveSwitchSet () const
const SwitchSetListgetSwitchSetList () const
const ValueListgetValueList (unsigned int switchSet) const

Protected Member Functions

virtual ~MultiSwitch ()
void expandToEncompassSwitchSet (unsigned int switchSet)

Protected Attributes

bool _newChildDefaultValue
unsigned int _activeSwitchSet
SwitchSetList _values

Detailed Description

MultiSwitch is a Group node which allows switching between sets of selected children. MultiSwtich is based on the OpenFlight switch behaviour.


Member Typedef Documentation

typedef std::vector<ValueList> osgSim::MultiSwitch::SwitchSetList
 

typedef std::vector<bool> osgSim::MultiSwitch::ValueList
 


Constructor & Destructor Documentation

osgSim::MultiSwitch::MultiSwitch  ) 
 

osgSim::MultiSwitch::MultiSwitch const MultiSwitch ,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osgSim::MultiSwitch::~MultiSwitch  )  [inline, protected, virtual]
 


Member Function Documentation

virtual bool osgSim::MultiSwitch::addChild osg::Node child  )  [virtual]
 

void osgSim::MultiSwitch::expandToEncompassSwitchSet unsigned int  switchSet  )  [protected]
 

unsigned int osgSim::MultiSwitch::getActiveSwitchSet  )  const [inline]
 

Get which of the available switch set lists to use.

bool osgSim::MultiSwitch::getChildValue const osg::Node child,
unsigned int  switchSet
const
 

bool osgSim::MultiSwitch::getNewChildDefaultValue  )  const [inline]
 

const SwitchSetList& osgSim::MultiSwitch::getSwitchSetList  )  const [inline]
 

bool osgSim::MultiSwitch::getValue unsigned int  switchSet,
unsigned int  pos
const
 

const ValueList& osgSim::MultiSwitch::getValueList unsigned int  switchSet  )  const [inline]
 

virtual bool osgSim::MultiSwitch::insertChild unsigned int  index,
osg::Node child
[virtual]
 

osgSim::MultiSwitch::META_Node osgSim  ,
MultiSwitch 
 

virtual bool osgSim::MultiSwitch::removeChild osg::Node child  )  [virtual]
 

void osgSim::MultiSwitch::setActiveSwitchSet unsigned int  switchSet  )  [inline]
 

Set which of the available switch set lists to use.

bool osgSim::MultiSwitch::setAllChildrenOff unsigned int  switchSet  ) 
 

Set all the children off (false), and set the new default child value to off (false).

bool osgSim::MultiSwitch::setAllChildrenOn unsigned int  switchSet  ) 
 

Set all the children on (true), and set the new default child value to on (true).

void osgSim::MultiSwitch::setChildValue const osg::Node child,
unsigned int  switchSet,
bool  value
 

void osgSim::MultiSwitch::setNewChildDefaultValue bool  value  )  [inline]
 

bool osgSim::MultiSwitch::setSingleChildOn unsigned int  switchSet,
unsigned int  pos
 

Set a single child to be on, MultiSwitch off all other children.

void osgSim::MultiSwitch::setValue unsigned int  switchSet,
unsigned int  pos,
bool  value
 

virtual void osgSim::MultiSwitch::traverse osg::NodeVisitor nv  )  [virtual]
 


Member Data Documentation

unsigned int osgSim::MultiSwitch::_activeSwitchSet [protected]
 

bool osgSim::MultiSwitch::_newChildDefaultValue [protected]
 

SwitchSetList osgSim::MultiSwitch::_values [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Mar 22 14:15:08 2005 for openscenegraph by  doxygen 1.4.0