2.8 branch: This is a wholesale update of all OpenFlight plugin source files from trunk. The 2.8.x FLT plugin is now in sync with trunk r12297 (April 19 2011). This commit includes the osgSim MultiSwitch changes in r11971.

This commit is contained in:
Paul MARTZ
2011-05-05 01:59:10 +00:00
parent b6ef8c9b6c
commit 85281a6d1b
24 changed files with 371 additions and 117 deletions

View File

@@ -69,8 +69,9 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
/** Get which of the available switch set lists to use.*/
unsigned int getActiveSwitchSet() const { return _activeSwitchSet; }
typedef std::vector<bool> ValueList;
typedef std::vector<ValueList> SwitchSetList;
typedef std::vector<bool> ValueList;
typedef std::vector<ValueList> SwitchSetList;
typedef std::vector<std::string> SwitchSetNameList;
/** Set the compile set of different values.*/
void setSwitchSetList(const SwitchSetList& switchSetList);
@@ -84,6 +85,10 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
/** Get the a single set of different values for a particular switch set.*/
const ValueList& getValueList(unsigned int switchSet) const { return _values[switchSet]; }
void setValueName(unsigned int switchSet, const std::string& name);
const std::string& getValueName(unsigned int switchSet) const { return _valueNames[switchSet]; }
protected :
virtual ~MultiSwitch() {}
@@ -91,9 +96,10 @@ class OSGSIM_EXPORT MultiSwitch : public osg::Group
void expandToEncompassSwitchSet(unsigned int switchSet);
// this is effectively a list of bit mask.
bool _newChildDefaultValue;
unsigned int _activeSwitchSet;
SwitchSetList _values;
bool _newChildDefaultValue;
unsigned int _activeSwitchSet;
SwitchSetList _values;
SwitchSetNameList _valueNames;
};
}