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
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);
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
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.
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
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
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:
7 matches
Mail list logo