Show
Ignore:
Timestamp:
03/25/10 18:50:29 (4 years ago)
Author:
cedricpinson
Message:

Change time type from float to double in osgAnimation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgAnimation/Animation.cpp

    r11009 r11291  
    8181} 
    8282 
    83 float Animation::getDuration() const 
     83double Animation::getDuration() const 
    8484{ 
    8585    return _duration; 
     
    9696} 
    9797 
    98 bool Animation::update (float time, int priority) 
     98bool Animation::update (double time, int priority) 
    9999{ 
    100100    if (!_duration) // if not initialized then do it 
     
    103103    double ratio = _originalDuration / _duration; 
    104104 
    105     float t = (time - _startTime) * ratio; 
     105    double t = (time - _startTime) * ratio; 
    106106    switch (_playmode)  
    107107    { 
     
    118118            t = _startTime; 
    119119        else if (t > _duration) 
    120             t = fmod(t, (float)_duration); 
     120            t = fmod(t, _duration); 
    121121        //      std::cout << "t " << t << " duration " << _duration << std::endl; 
    122122        break;