Hi,
Iwould like to introspect StateSet in order to know which override value is 
activated for a particular stateset.
I parse AttributeList for this 

Code:
for( osg::StateSet::AttributeList::const_iterator 
it=ss->getAttributeList().begin();it!=ss->getAttributeList().end() ; it++)
{
            if((*it).second.first ==stateattribute)
            { 
                if( (*it).second.second & osg::StateAttribute::ON)
                return(1);  
                else return(0);
}



but according to StateSet.cpp l.1662

Code:
attributeList[attribute->getTypeMemberPair()] = 
RefAttributePair(attribute,value&(StateAttribute::OVERRIDE|StateAttribute::PROTECTED));



the ON OFF bit is removed from the given user value. So I can't determine if an 
osg::Attribute is ON or OFF but only if it's OVERRIDE or PROTECTED
I would like to know if there's a known reason behind this logic & and further 
if you know a mean to retrieve the ON/OFF bit.

Thank you!

Cheers,
Julien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65081#65081





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to