osg object AnimationPathCallback
osg::ref_ptr<osg::Node> OSG_Qt_::operateMatrix() { osg::ref_ptr<osg::Group> group = new osg::Group; osg::ref_ptr<osg::Node> node1 = osgDB::readNodeFile("D:\\参考手册\\BIM\\osg\\tanker.OSGB"); osg::ref_ptr<osg::Node> node2 = osgDB::readNodeFile("D:\\参考手册\\BIM\\osg\\tanker.OSGB"); osg::ref_ptr<osg::MatrixTransform> matrixT = new osg::MatrixTransform; matrixT->addChild(node1); matrixT->setMatrix(osg::Matrix::translate(2000.0,0.0,0.0)); matrixT->setUpdateCallback(new osg::AnimationPathCallback(osg::Vec3(0.0,0.0,0.0),osg::Z_AXIS,1.0)); group->addChild(node2); group->addChild(matrixT.get()); return group; }
QQ 3087438119