Re: [osg-users] split scene into separate nodes/files.

2010-01-10 Thread Danny Lesnik
Hi, Now I know that there might be more then one MatrixTranform on the tree for each node. The problem is solved. Thank you very much for your help. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22350#22350

Re: [osg-users] split scene into separate nodes/files.

2010-01-09 Thread Ulrich Hertlein
Hi Danny, On 9/01/10 3:32 AM, Danny Lesnik wrote: np = npl.front(); osg::Matrixd localToWorld = osg::computeLocalToWorld(np); grp = new osg::Group(); grp-addChild(node); matrixtransform = new osg::MatrixTransform(); matrix-setMatrix(localToWorld);

Re: [osg-users] split scene into separate nodes/files.

2010-01-09 Thread Martin Beckett
Or you could multiply each of the vertices in the node by the matrix to put it into a world coordinate, and then just ignore the matrix. Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22335#22335

Re: [osg-users] split scene into separate nodes/files.

2010-01-08 Thread Danny Lesnik
Hi, As far as I understand, but the WorldMatrix resides in the MatrixTransform node which is farther of Geode so when I'm getting Geode I'm actually saving its farther (MatrixTransform) The Geode is currGroup-getChild(i) And the farther is CurrGroup which I also tried to save.

Re: [osg-users] split scene into separate nodes/files.

2010-01-08 Thread J.P. Delport
Hi, Danny Lesnik wrote: Hi, As far as I understand, but the WorldMatrix resides in the MatrixTransform node which is farther of Geode so when I'm getting Geode I'm actually saving its farther (MatrixTransform) The Geode is currGroup-getChild(i) And the farther is CurrGroup which I also

Re: [osg-users] split scene into separate nodes/files.

2010-01-08 Thread Danny Lesnik
Hi, I tried the following: Code: node = dynamic_castosg::Node*(currGroup-getChild(i)); osg::NodePathList npl = node-getParentalNodePaths(); if (!npl.empty()) { np = npl.front(); osg::Matrixd localToWorld = osg::computeLocalToWorld(np); grp = new

Re: [osg-users] split scene into separate nodes/files.

2010-01-07 Thread Martin Beckett
Do you have PAT nodes in your tree to set the relative postions of the objects? You aren't saving these with the geodes, an alternative woudl be to multiply every vertex in each geode with the worldmatrix as it is saved. Martin -- Read this topic online here: