Changeset 13041 for OpenSceneGraph/trunk/include/osg/Switch
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Switch (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Switch
r9321 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 */ … … 21 21 /** Switch is a Group node that allows switching between children. 22 22 * Typical uses would be for objects which might need to be rendered 23 * differently at different times, for instance a switch could be used 23 * differently at different times, for instance a switch could be used 24 24 * to represent the different states of a traffic light. 25 25 */ … … 27 27 { 28 28 public : 29 29 30 30 31 31 Switch(); … … 41 41 42 42 virtual void traverse(NodeVisitor& nv); 43 43 44 44 void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; } 45 45 46 46 bool getNewChildDefaultValue() const { return _newChildDefaultValue; } 47 47 … … 62 62 63 63 void setChildValue(const Node* child,bool value); 64 64 65 65 bool getChildValue(const Node* child) const; 66 66 … … 68 68 * value to off (false). */ 69 69 bool setAllChildrenOff(); 70 70 71 71 /** Set all the children on (true), and set the new default child 72 72 * value to on (true). */ 73 73 bool setAllChildrenOn(); 74 74 75 75 /** Set a single child on, switch off all other children. */ 76 76 bool setSingleChildOn(unsigned int pos); 77 77 78 78 79 79 typedef std::vector<bool> ValueList; 80 80 81 81 void setValueList(const ValueList& values) { _values=values; } 82 82 … … 86 86 87 87 protected : 88 88 89 89 virtual ~Switch() {} 90 90
