|
- void TestMTN(osg::ref_ptr<osg::Node> node)
- {
- osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer();
- osg::ref_ptr<osg::Group> group = new osg::Group();
- osg::ref_ptr<osg::MatrixTransform> mt = new osg::MatrixTransform();
- mt->addChild(node.get());
- mt->setMatrix(osg::Matrixd::translate(osg::Vec3(20.0f,0.0f,0.0f)));
- group->addChild(mt.get());
- group->addChild(node.get());
-
-
-
- viewer->setSceneData(group.get());
- viewer->realize();
- viewer->run();
-
- }
- void main()
- {
-
-
-
- osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("cow.osg");
-
- TestMTN(node);
-
-
- }
复制代码
|
|