I have implemented my own quadtree which displays textured tiles. Goal is to implement my own large-scale terrain rendering system. Each Node of the quadtreee represents the terrain at differnet level of detail. Each node of the tree knows it's dimensions and a texture. During the cull traversal the quadtree is traversed down to the required LOD, and the corresponding nodes should be added to the scene graph. I am aware of the fact that it's not a good idea to do this every osg cull traversal but the quadtree and all related stuff should be independent from all displaying stuff, namely OpenSceneGraph. For now this is only for testing purpose but I am wondering why I can't remove drawables in the accept method. When I comment out the removeDrawables call everything works but then the number of drawables goes up to infinte since the old ones won't be removed. I would appreciate ideas on how to implementd this with openscengraph more efficient. Maybe there are ways to rebuilt the Quadtree datastructure in osg with AdapterNodes for the Nodes already implemented in my quadtree. For now a hint on how to get the removeDrawables call working would do the trick.

Martin


Robert Osfield schrieb:
On 5/10/07, *Martin Weier* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Thanks for the quick reply. This is definetly not an indexing problem.
    Starting bg removeDrawables from 1 was on purpose since starting
    from 0
    didn't work.
    Do you have an idea what else could go wrong?


Um... what exactly are you trying to do here, what makes you think that its not working.

As I said, if you want to delete all the children then you HAVE to use 0 as the index.

As I said doing deletes in a traversal is bad thing anyway and suggest that you are doing something much more wrong with you overall algorithm.

Robert.
------------------------------------------------------------------------

_______________________________________________
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