<div dir="ltr">Hi Julien,<div>it's OFF, the enum for <span style="font-size:12.8px">StateAttribute::OFF is 0x0, so anything not ON has value OFF.</span></div><div><span style="font-size:12.8px">Regards, Laurens.</span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 7:45 PM, Julien Valentin <span dir="ltr"><<a href="mailto:julienvalentin51@gmail.com" target="_blank">julienvalentin51@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
Iwould like to introspect StateSet in order to know which override value is activated for a particular stateset.<br>
I parse AttributeList for this<br>
<br>
Code:<br>
for( osg::StateSet::AttributeList::const_iterator it=ss->getAttributeList().begin();it!=ss->getAttributeList().end() ; it++)<br>
{<br>
if((*it).second.first ==stateattribute)<br>
{<br>
if( (*it).second.second & osg::StateAttribute::ON)<br>
return(1);<br>
else return(0);<br>
}<br>
<br>
<br>
<br>
but according to StateSet.cpp l.1662<br>
<br>
Code:<br>
attributeList[attribute->getTypeMemberPair()] = RefAttributePair(attribute,value&(StateAttribute::OVERRIDE|StateAttribute::PROTECTED));<br>
<br>
<br>
<br>
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<br>
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.<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Julien<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=65081#65081" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=65081#65081</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br></div>