Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. osg::AnimationPath *animationFirstCar() {
  2.     //anim path is list of position with time value
  3.     osg::AnimationPath *pPath = new osg::AnimationPath();
  4.  
  5.     float localTime = 0.0f;
  6.  
  7.     pPath->insert(localTime, osg::AnimationPath::ControlPoint(g_Roads[0]->animationPoint(0, g_pRoot)));
  8.  
  9.     for (int i = 16; i <= 18; i++) {
  10.         pPath->insert(localTime += gc_fTimeUnit, osg::AnimationPath::ControlPoint(g_Roads[i]->animationPoint(0, g_pRoot), osg::Quat(osg::PI_2 * -3, osg::Z_AXIS)));
  11.     }
  12.    
  13.     pPath->insert(localTime += gc_fTimeUnit, osg::AnimationPath::ControlPoint(g_Roads[30]->animationPoint(0, g_pRoot)));
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement