[osg-users] Is this a too dirty hack?
gordon.tomlinson at sensor.com
Wed Jul 23 05:28:20 PDT 2008
Has Max head room entered the OSG ;)
Your email is repeating ;) ,at least for me
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
Sent: Wednesday, July 23, 2008 8:02 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Is this a too dirty hack?
Do you really have to go through all this hassle? Can't you just catch
changes to the scene graph as they are being made by your app?
The only part of the OSG which which would add nodes to the scene graph is
the DatabasePager, and you can catch all loads from this via a
On Wed, Jul 23, 2008 at 11:35 AM, Viggo Løvli <vigigio at hotmail.com> wrote:
> I am on the quest to figure out when the node-tree is dirty.
> I have found a way... But I do not know if this way is a too dirty
> hack to actually use.
> I have a class that inherit osg::Group.
> I use this as the root of my scene-graph.
> Each time someone add a node to the world, then the dirtyBound
> function will be called for all parents. This function is not virtual
> so I can not override it in my specialization of the osg::Group class.
> I can however set up a callback that is called when we calculate the
> bounding sphere.
> This callback is only executed if someone call getBound when the
> bounding-sphere is set to dirty.
> So, if the callback to calculate a bounding sphere is called on my
> root-node then I know that the node tree has been changed.
> I can thus check if the node-tree is 'dirty' by calling getBound() on
> my own class. If that results in a callback then it was dirty.
> So the question is: Is this a too dirty hack to use, or is it okish?
> Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users