| 97 | } |
| 98 | |
| 99 | void ShowHideAnimation::RefreshInterpolator(std::array<EState, 2> validStates, double endValue) |
| 100 | { |
| 101 | EState state = GetState(); |
| 102 | if (state == validStates[0] || state == validStates[1]) |
| 103 | return; |
| 104 | |
| 105 | double start = GetT(); |
| 106 | double end = endValue; |
| 107 | double duration = fabs(end - start) * m_fullDuration; |
| 108 | m_interpolator.reset(new ShowHideInterpolator(m_state, start, end, duration)); |
| 109 | } |
| 110 | } // namespace df |