Hi Bill,

The easist thing to do would be to osg::Node::getParentalNodePaths() to get the list all possible NodePath's to your node. 

Then walk through each of these NodePath to compute the final state are the leaf node, honouring the override/protect settings.

Robert.

On 9/22/06, Bill Prendergast <[EMAIL PROTECTED]> wrote:
> Although it may not be the most efficient, wouldn't it be easier to
> start from the root of the scene and walk the path down to your node
> and use the same StateSet application logic that OSG uses?

Perhaps so.  But consider this...

Right at the node I would like to get a Material for, let's say
there is a stateset with OVERRIDE | ON for material.

I'm just learning statesets, but it would seem to me that I
could stop right there because the node has its own unique
material.  I wouldn't need to traverse upwards.

Similarly, if I ever hit any parent node where there is a
fixed stateset with material, I could stop.

The only problem with walking "down" to my node is knowing
apriori the child path needed to get there.


I still need to learn to always think about material as a "state"
and not a property of a geometry.  Physically, I keep thinking
of a drawable as having faces, textures, and materials ;-)

_______________________________________________
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/

Reply via email to