Hi Jesper,
Adding/removing node/drawables/stateset from the scene graph is not
something I would recommend users do for toggling the visibility of
items. The best way is to decorate the subraphs with an osg::Switch
node, or use the osg::Node::set/getNodeMask(uint) setting it to 0x0
and
...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: 8. april 2010 11:57
To: OpenSceneGraph Users
Subject: Re: [osg-users] Showing and hiding objects by removing/adding
drawables.
Hi Jesper,
Adding/removing node/drawables/stateset from the scene graph is not
something I would recommend
The event picker doesn't take a nodemask to traverse like the nodevisitor, so
it returns all hits - visible or not.
I made a small mod to the IntersectorVisitor to take a traversal mask and only
visit those nodes with it set.
It needs a bit of cleaning up to meet OSG standards - I will post it
Hi Martin,
The event picker doesn't take a nodemask to traverse like the nodevisitor, so
it returns all hits - visible or not.
I made a small mod to the IntersectorVisitor to take a traversal mask and only
visit those nodes with it set.
It needs a bit of cleaning up to meet OSG standards - I
But there didn't seem to be any code inside the intersector to act on the
traversal mask.
I added to:
Code:
bool IntersectorGroup::enter(const osg::Node node) {
if ( !(node.getNodeMask() _traversalMask) ) return false;
.
Martin
--
Read this topic online here:
Hello Martin,
But there didn't seem to be any code inside the intersector to act on the
traversal mask.
Again, since IntersectionVisitor is a NodeVisitor, the traversal will
implicitly call NodeVisitor::traverse(node), which calls either
Node::ascend(nv) or Node::traverse(nv), which for
Jesper D. Thomsen wrote:
Hi again, thank you very much for your insight.
I have now tried using nodemasks to hide inactive objects by applying nodemasks
to their transforms. However, my primary problem remains. I see a massive
speedup in general drawing speed, but the picker still finds
7 matches
Mail list logo