|
osg2.99版本
在学osganimation,skinning例子中有几个问题;
1.setInvBindMatrixInSkeletonSpace是设置什么矩阵?怎么使用的?为什么修改translate(0,0,0)里面的值,对运行结果没影响?
2.StackedRotateAxisElement里面可以设置以什么角度旋转,StackedTranslateElement是怎么一种平移?谢谢
osg::ref_ptr<osgAnimation::Bone> right0 = new osgAnimation::Bone;
right0->setInvBindMatrixInSkeletonSpace(osg::Matrix::inverse(osg::Matrix::translate(0,0,0)));
right0->setName("right0");
osgAnimation::UpdateBone* pRight0Update = new osgAnimation::UpdateBone("right0");
pRight0Update->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("translate", osg::Vec3(1,0,0)));
pRight0Update->getStackedTransforms().push_back(new osgAnimation::StackedRotateAxisElement("rotate", osg::Vec3(0,0,1), 0));
right0->setUpdateCallback(pRight0Update); |
|