#ifndef __CALCULATOR_H__ #define __CALCULATOR_H__ #include #include #include #include "field.h" class Calculator { typedef Field2D> WaveFunction; size_t nx, ny; WaveFunction psi; SDL_Window* win; SDL_Renderer* renderer; SDL_Texture* tex; double t; double scale; void initSDL(); void finishSDL(); void updateTexture(double scale); void updateScreen(); public: Calculator(/*...............*/) : t(0), scale(1), nx(100), ny(100), psi(nx,ny) { initSDL(); } ~Calculator() { finishSDL(); } void step(double dt) { } //Interaction and visualization bool exitRequested() const; void draw() { updateTexture(scale); updateScreen(); } }; #endif