|
各位高手好:
osg::ref_ptr<osg::Group> root=new osg::Group;
osg::Node* cow=osgDB::readNodeFile("cow.osg");
osg::ref_ptr<osg::PositionAttitudeTransform> pat1=new osg::PositionAttitudeTransform;
pat1->addChild(cow);
root->addChild(pat1);
pat1->setPosition(osg::Vec3(10,0,0));
osg::Quat quat1;
quat1.makeRotate(osg::PI_2,osg::Vec3(0,0,1));
pat1->setAttitude(quat1);
root->addChild(cow);
上面这段话中的
pat1->setPosition(osg::Vec3(10,0,0));
pat1->setAttitude(quat1);
如果换成
pat1->setAttitude(quat1);
pat1->setPosition(osg::Vec3(10,0,0));
这样前后顺序对调,效果一样吗?有区别吗?
感谢!! |
|