|
发表于 2011-7-4 19:58:12
|
显示全部楼层
请参考osganimate这个例子
- for(int i=0;i<numSamples;++i)
- {
- osg::Vec3 position(center+osg::Vec3(sinf(yaw)*radius,cosf(yaw)*radius,0.0f));
- osg:uat rotation(osg:uat(roll,osg::Vec3(0.0,1.0,0.0))*osg:uat(-(yaw+osg::inDegrees(90.0f)),osg::Vec3(0.0,0.0,1.0)));
-
- animationPath->insert(time,osg::AnimationPath::ControlPoint(position,rotation));
- yaw += yaw_delta;
- time += time_delta;
- }
复制代码 |
|