added vector fields

This commit is contained in:
Lauchmelder 2021-12-09 19:49:33 +01:00
parent 5dbcbd6c02
commit 30e130d123
5 changed files with 126 additions and 1 deletions

24
src/VectorField.hpp Normal file
View file

@ -0,0 +1,24 @@
#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);
private:
int width, height;
std::vector<double> horizontal;
std::vector<double> vertical;
double biggestMagnitude = 0.0;
};