24 void draw(uint32_t time)
override;
30 static constexpr
int X = 0, Y = 270, WIDTH = 480, HEIGHT = 40;
31 const double PI = std::acos(-1);
32 static constexpr
float DIVISION = 30.f;
33 const int RANGE = HEIGHT / 2;
34 const int BASE_Y = Y + HEIGHT / 2;
35 static constexpr
int REVOLUTION_TIME = 2000;
36 int ADDITIONAL_PIXELS = 4 * DIVISION;
38 const SDL_Point* makePoints(
const std::vector<int>& points,
int count,
int offset);
39 std::vector<int> points;
40 SDL_Renderer* renderer;
41 SDL_Point buffer[WIDTH];
int getY() const
Definition: SineWaveAnimation.cpp:24
The main application class header.
SineWaveAnimation()
Definition: SineWaveAnimation.cpp:3
Definition: SineWaveAnimation.h:20
int getX() const
Definition: SineWaveAnimation.cpp:19
An abstract class implementing both the GraphicsObject and the TouchEnabledObject, which gives an interactive graphic object as result.
Definition: InteractiveGraphicsObject.h:20
int getWidth() const
Definition: SineWaveAnimation.cpp:29
void draw(uint32_t time) override
The draw method. It will be called once per frame for each object in a scene.
Definition: SineWaveAnimation.cpp:12
int getHeight() const
Definition: SineWaveAnimation.cpp:34