HI James, There isn't a specific bit of designed to do what you want, but you could probably use the NodePath and a local osg::State object to accumulate the state and capture the overal result of accumulation vai the following methods:
osg::pushStateSet(const StateSet*); osg::popStateSet(const StateSet*); osg::State::captureCurrentState(StateSet& stateset); However, I have never tested this usage before, so it may or may not work as you require. Robet. On 5/3/06, James Turner <[EMAIL PROTECTED]> wrote:
I have a situation, where I need to query the final stateset (including parent node's state sets, and overrides) for a geometry, outside of rendering. Actually, it's for analysing the results of an intersect visitor, where I discard intersections whose normal faces away from the camera. I only want to run this check if back-face culling is enabled, i.e I need to check the value of CullFace associated with the geometry. But if I simply look at the stateset of the geometry itself (via getStateSet->getAttribute), presumably I'll 'miss' any inherited state; it's very likely the CullFace attribute has been set on the geodes in my case, for example. I'd imagined there would be a way to resolve the final stateset, given a nodepath; does this in fact exist, or do I have to manually traverse the node path, looking at each stateset in turn? Regards, James Turner _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
