2021-12-09 18:49:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
struct SDL_Rect;
|
|
|
|
struct SDL_Renderer;
|
|
|
|
|
|
|
|
class VectorField
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VectorField();
|
|
|
|
VectorField(int width, int height);
|
|
|
|
VectorField(int width, int height, const std::vector<double>& hori, const std::vector<double>& vert);
|
|
|
|
|
|
|
|
void Draw(SDL_Renderer* renderer, const SDL_Rect& targetRect);
|
2021-12-10 21:18:20 +00:00
|
|
|
void RecalculateMagnitude();
|
2021-12-09 18:49:33 +00:00
|
|
|
|
2021-12-10 01:52:16 +00:00
|
|
|
public:
|
2021-12-09 18:49:33 +00:00
|
|
|
std::vector<double> horizontal;
|
|
|
|
std::vector<double> vertical;
|
|
|
|
|
2021-12-10 01:52:16 +00:00
|
|
|
private:
|
|
|
|
int width, height;
|
|
|
|
|
2021-12-09 18:49:33 +00:00
|
|
|
double biggestMagnitude = 0.0;
|
|
|
|
};
|