Quick question about how you typically handle non-model objects in the scene,
eg grids, coordinate axis icons, north arrows, bounding cubes.
The problem with just attaching them to the nodes is that statesets, picking
and save operation apply to them. So a pick might find the grid and changing
Hi Martin,
as in my case, I always do derive a non-model class from osg::Group and use it
as a base class of the non-model object. Deriving from Group gives you the
possibility to include the object somewhere in the scene graph if it is
required, so that the nodes to which it belongs can be pla
art wrote:
> as in my case, I always do derive a non-model class from osg::Group and use
> it as a base class of the non-model object. Deriving from Group gives you the
> possibility to include the object somewhere in the scene graph if it is
> required, so that the nodes to which it belongs ca
Hi Martin,
mgb_osg wrote:
>
> Would visitors still apply to it as with any other node in the graph - I
> don't see how that helps?
Of course they would, however nodes are not drawable things, nodes are there
just to organize the scene graph. I thought, you want to include something
non-drawa
No - I want the exact opposite!
I want things that are drawn in the scene (eg gridlines) but do not respond to
other scenegraph events so they can't be picked, saved, or be affected by
lighting/drawing changes.
Some of this I can do with stateattribute so that eg. a gridline is always
drawn wi
Hi Martin,
Some of this I can do with stateattribute so that eg. a gridline is always
drawn with no lighting but for things like picking the intersector visitor must
explicitly know to ignore a grid.
The point was to make a distinction between real model elements and
'decoration' elements -
Skylark wrote:
> Hi Martin,
>
> Why not just devote a bit in the nodemask for such elements? Then you
> set the intersection visitor's traversal mask to ignore those elements.
>
> const unsigned int NODEMASK_UNPICKABLE = 0x1000;// whatever
> iv->setTraversalMask(~NODEMASK_UNPICKABLE);
>
>
Jean-Sébastien Guay wrote:
> const unsigned int NODEMASK_UNPICKABLE = 0x1000;// whatever
> iv->setTraversalMask(~NODEMASK_UNPICKABLE);
> That's how we do it.
This is what I do too. I have a flag called INTANGIBLE and anything I don't
want "hit"
by picking (clouds, etc) is flagged that way.
Skylark wrote:
>
> Why not just devote a bit in the nodemask for such elements? Then you
> set the intersection visitor's traversal mask to ignore those elements.
>
> That's how we do it.
That seems to make most sense.
Thanks
Martin
--
Read this topic online here:
http://foru
9 matches
Mail list logo