Changeset 13041 for OpenSceneGraph/trunk/include/osgSim/MultiSwitch
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgSim/MultiSwitch (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgSim/MultiSwitch
r11961 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 26 26 { 27 27 public : 28 28 29 29 30 30 MultiSwitch(); … … 36 36 37 37 virtual void traverse(osg::NodeVisitor& nv); 38 38 39 39 void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; } 40 40 41 41 bool getNewChildDefaultValue() const { return _newChildDefaultValue; } 42 42 … … 52 52 53 53 void setChildValue(const osg::Node* child,unsigned int switchSet, bool value); 54 54 55 55 bool getChildValue(const osg::Node* child,unsigned int switchSet) const; 56 56 57 57 /** Set all the children off (false), and set the new default child value to off (false).*/ 58 58 bool setAllChildrenOff(unsigned int switchSet); 59 59 60 60 /** Set all the children on (true), and set the new default child value to on (true).*/ 61 61 bool setAllChildrenOn(unsigned int switchSet); 62 62 63 63 /** Set a single child to be on, MultiSwitch off all other children.*/ 64 64 bool setSingleChildOn(unsigned int switchSet, unsigned int pos); 65 65 66 66 /** Set which of the available switch set lists to use.*/ 67 67 void setActiveSwitchSet(unsigned int switchSet) { _activeSwitchSet = switchSet; } 68 68 69 69 /** Get which of the available switch set lists to use.*/ 70 70 unsigned int getActiveSwitchSet() const { return _activeSwitchSet; } … … 73 73 typedef std::vector<ValueList> SwitchSetList; 74 74 typedef std::vector<std::string> SwitchSetNameList; 75 75 76 76 /** Set the compile set of different values.*/ 77 77 void setSwitchSetList(const SwitchSetList& switchSetList); … … 91 91 92 92 protected : 93 93 94 94 virtual ~MultiSwitch() {} 95 95 96 96 void expandToEncompassSwitchSet(unsigned int switchSet); 97 97
