Hello Patrick,

why not simply traverse the scenegraph and fetch those nodes within a 
list/vector whatever and apply those modifications later ?

Regards

Matthias

On Friday 02 June 2006 00:15, Patrick Hartling wrote:
> Does OpenSG have any mechanism for allowing a scene graph to be
> modified while it is being traversed? The situation I have is one in
> which I run OSG::traverse() looking for nodes with specific
> information attached. If a node is found with the necessary
> information but with a core other than what is needed, then I need to
> insert a new node into the scene graph as a parent of the found node.
> The way that I handle this currently is to traverse first and then do
> the re-parenting later.
>
> While this works, it has been a fairly error-prone approach that has
> led to a lot of crashes happening long after the traversal because I
> forgot to do the re-parenting step after traversal. (The crashes were
> caused by assertion failures that I added to catch this specific
> mistake in my code.) What I would like to do is perform the
> re-parenting as soon as it is known to be needed, but it seems like
> this would interfere with the traversal algorithm. Is that the case?
> If so, is there any recommendation on how to handle a case such as
> what I have described?
>
>  -Patrick

-- 
+---------------------+----------------------------+
| VREC GmbH           |                            |
| Matthias Stiller    |                            |
| Robert-Bosch-Str. 7 | tel:    +49 6151 4921034   |
| 64293 Darmstadt     | web:    http://www.vrec.de |
| Germany             | mail:   [EMAIL PROTECTED]         |
+---------------------+----------------------------+


_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to