added vector fields
This commit is contained in:
parent
5dbcbd6c02
commit
30e130d123
5 changed files with 126 additions and 1 deletions
24
src/VectorField.hpp
Normal file
24
src/VectorField.hpp
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue