Hi,

yang zhiyuan wrote:
Hi:
   I find something strange like this:
   osg::Matrix _matrix;
   osg::ref_prt<osg::MatrixTransform> PAT1 = new osg::MatrixTransform();
   _matrix.setTrans(osg::Vec3(10.0f,10.0f,0.0f));
   PAT1 ->setMatrix(_matrix);
   osg::ref_prt<osg::MatrixTransform> PAT2 = new osg::MatrixTransform();
   PAT2 ->setMatrix(_matrix);
   osg::ref_prt<osg::MatrixTransform> PAT3= new osg::MatrixTransform();
   PAT3 ->setMatrix(_matrix);
   osg::ref_prt<osg::MatrixTransform> PAT4= new osg::MatrixTransform();
   PAT4 ->setMatrix(_matrix);
PAT1->addChild(PAT2->get());
  PAT2->addChild(PAT3->get());
  PAT3->addChild(PAT4->get());
osg::Node* node = osgDB::readNodeFile("*.ive");
 PAT4->addChild(node);
I think node's final position is (40,40,0),but the actual position in scene is(10,10,0).Do I have to accumulate the four MatrixTransform manually?

How did you calculate the actual position?

jp

tim.yan

------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to