Changeset 11291 for OpenSceneGraph/trunk/src/osgAnimation/Animation.cpp
- Timestamp:
- 03/25/10 18:50:29 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgAnimation/Animation.cpp
r11009 r11291 81 81 } 82 82 83 floatAnimation::getDuration() const83 double Animation::getDuration() const 84 84 { 85 85 return _duration; … … 96 96 } 97 97 98 bool Animation::update ( floattime, int priority)98 bool Animation::update (double time, int priority) 99 99 { 100 100 if (!_duration) // if not initialized then do it … … 103 103 double ratio = _originalDuration / _duration; 104 104 105 floatt = (time - _startTime) * ratio;105 double t = (time - _startTime) * ratio; 106 106 switch (_playmode) 107 107 { … … 118 118 t = _startTime; 119 119 else if (t > _duration) 120 t = fmod(t, (float)_duration);120 t = fmod(t, _duration); 121 121 // std::cout << "t " << t << " duration " << _duration << std::endl; 122 122 break;
