Welcome to mirror list, hosted at ThFree Co, Russian Federation.

anyrect_interpolation.hpp « anim - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9ba9272b0a5e97d667ac4680b968121f58eaa30d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once

#include "../geometry/any_rect2d.hpp"
#include "angle_interpolation.hpp"
#include "segment_interpolation.hpp"
#include "value_interpolation.hpp"

namespace anim
{
  class AnyRectInterpolation : public Task
  {
  private:

    double m_interval;

    AngleInterpolation m_angleInt;
    double m_curAngle;

    SegmentInterpolation m_segmentInt;
    m2::PointD m_curCenter;

    ValueInterpolation m_sizeXInt;
    double m_curSizeX;

    ValueInterpolation m_sizeYInt;
    double m_curSizeY;

    m2::AnyRectD m_startRect;
    m2::AnyRectD m_endRect;
    m2::AnyRectD & m_outRect;

    double m_startTime;

  public:

    AnyRectInterpolation(m2::AnyRectD const & startRect,
                         m2::AnyRectD const & endRect,
                         double rotationSpeed,
                         m2::AnyRectD & outRect);

    void OnStart(double ts);
    void OnStep(double ts);
    void OnEnd(double ts);
    void OnCancel(double ts);
  };
}