Hi Werner, Could you back out a bit, and introduce the problem your are tackling at a high level so that others get a picture about what you are trying to achieve, diving into what solution you've code is often premature.
From what I can gather integration of the simulation code and rendering code is at the core of what you are trying to achieve. Could you explain more about the simulation code, such as how it's threaded, is synchronous to the rendering thread etc. Also on the rendering side, how do you want to render it? Robert. On Thu, Sep 16, 2010 at 10:36 AM, Werner Modenbach <[email protected]> wrote: > OK Robert, > > I still have the impression I have exactly the same case as Dženan. > But if you prefer I'll open a new thread. > I'm using AdapterWidget in Qt and I'm running it single threaded as Dženan > does. > I'm replacing a node in the scene graph by a newly created one. > > Here is my scene hierarchie: > > osg::ref_ptr<osg::Switch> bigScene; // The whole scene > > My textile: > osg::ref_ptr<osg::Switch> scene; // Textile fabric > attached to the whole scene by > bigScene->setNode(0, scene.get()); > > scene has many nodes representing one textile thread each, defines as > osg::ref_ptr<osg::Node> yarn; > attached to scene by > scene->setNode(yarnNumber, yarn.get()); > > I sayed I have to recalculate the geometry of the yarn nodes frewuently. > This is done by creating a NEW geometry and a NEW yarn node, the replacing the > old yarn node by the new one calling: > scene->setNode(yarnNumber, yarn.get()); > > So what I actually do is replacing an existing node by a new one. > When doing just that, my bigScene doesn't recognize the changed leafes. > But after calling > bigScene->setNode(position, scene.get()); > > again - with the same scene.get() as before - the changes were recognized > immediately. > I know my approach maybe incorrect but I'm also just at the beginning of my > work with osg. > > - Werner - > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

