- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgGA/AnimationPathManipulator.cpp
r12034 r13041 5 5 using namespace osgGA; 6 6 7 AnimationPathManipulator::AnimationPathManipulator(osg::AnimationPath* animationPath) 7 AnimationPathManipulator::AnimationPathManipulator(osg::AnimationPath* animationPath) 8 8 { 9 9 _printOutTimingInfo = true; … … 13 13 _timeScale = 1.0; 14 14 _isPaused = false; 15 15 16 16 _realStartOfTimedPeriod = 0.0; 17 17 _animStartOfTimedPeriod = 0.0; … … 19 19 } 20 20 21 AnimationPathManipulator::AnimationPathManipulator( const std::string& filename ) 21 AnimationPathManipulator::AnimationPathManipulator( const std::string& filename ) 22 22 { 23 23 _printOutTimingInfo = true; … … 42 42 43 43 in.close(); 44 44 45 45 } 46 46 … … 49 49 if (_animationPath.valid()) 50 50 { 51 _timeOffset = _animationPath->getFirstTime()-currentTime; 51 _timeOffset = _animationPath->getFirstTime()-currentTime; 52 52 53 53 } … … 86 86 { 87 87 _isPaused = false; 88 88 89 89 home(ea,us); 90 90 us.requestRedraw(); 91 91 us.requestContinuousUpdate(false); 92 92 93 93 return true; 94 } 94 } 95 95 else if (ea.getKey()==')') 96 96 { … … 104 104 // adjust timeOffset so the current animationTime does change. 105 105 _timeOffset = animationTime/_timeScale - time; 106 106 107 107 return true; 108 } 108 } 109 109 else if (ea.getKey()=='(') 110 110 { … … 113 113 114 114 _timeScale /= 1.1; 115 115 116 116 OSG_NOTICE<<"Animation speed = "<<_timeScale*100<<"%"<<std::endl; 117 117 118 118 // adjust timeOffset so the current animationTime does change. 119 119 _timeOffset = animationTime/_timeScale - time; 120 120 121 121 return true; 122 } 122 } 123 123 else if(ea.getKey() == 'p') 124 124 { … … 137 137 return true; 138 138 } 139 139 140 140 break; 141 141 default:
