Thanks,
That's what i suspected...

Have a good day:)


Voerman, L. wrote:
> Sorry, you are right, i did not read your question properly.Modes could have 
> a value OFF, attributes do not, they are always ON
> Laurens.
> 
> 
> On Thu, Sep 10, 2015 at 1:35 PM, Julien Valentin < ()> wrote:
> 
> > I think you misread the question:
> > You can't know if the flags is ON/OFF as the bit seams ignored and then not 
> > stored...
> > Using the posted code, it never returns 1.
> > 
> > 
> > 
> > 
> > Voerman, L. wrote:
> > 
> > > Hi Julien,it's OFF, the enum for StateAttribute::OFF is 0x0, so anything 
> > > not ON has value OFF.
> > > Regards, Laurens.
> > > 
> > > 
> > > 
> > > 
> > > On Wed, Sep 9, 2015 at 7:45 PM, Julien Valentin < ()> wrote:
> > > 
> > > 
> > > > 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 
> > > > (http://forum.openscenegraph.org/viewtopic.php?p=65081#65081) 
> > > > (http://forum.openscenegraph.org/viewtopic.php?p=65081#65081 
> > > > (http://forum.openscenegraph.org/viewtopic.php?p=65081#65081))
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > osg-users mailing list
> > > >   ()
> > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >  
> > > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > >  
> > > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >  
> > > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org))
> > > > 
> > > > 
> > > 
> > > 
> > >   ------------------
> > > Post generated by Mail2Forum
> > > 
> > 
> > 
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=65095#65095 
> > (http://forum.openscenegraph.org/viewtopic.php?p=65095#65095)
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to