+ add method to get display mask mode from view provider

This commit is contained in:
wmayer 2016-02-24 21:00:55 +01:00
parent d891ddba33
commit e6624bf1c3
2 changed files with 12 additions and 0 deletions

View File

@ -266,6 +266,16 @@ void ViewProvider::setDisplayMaskMode( const char* type )
setModeSwitch();
}
SoNode* ViewProvider::getDisplayMaskMode(const char* type) const
{
std::map<std::string, int>::const_iterator it = _sDisplayMaskModes.find( type );
if (it != _sDisplayMaskModes.end()) {
return pcModeSwitch->getChild(it->second);
}
return 0;
}
std::vector<std::string> ViewProvider::getDisplayMaskModes() const
{
std::vector<std::string> types;

View File

@ -308,6 +308,8 @@ protected:
void addDisplayMaskMode( SoNode *node, const char* type );
/// Activates the display mask mode \a type
void setDisplayMaskMode( const char* type );
/// Get the node to the display mask mode \a type
SoNode* getDisplayMaskMode(const char* type) const;
/// Returns a list of added display mask modes
std::vector<std::string> getDisplayMaskModes() const;
void setDefaultMode(int);