/* * 2D Physic Engine * app.h: * Based on pikuma.com Learn Game Physics Engine Programming course. * Copyright (c) 2022 986-Studio. All rights reserved. * * Created by Manoƫl Trapier on 07/06/2022. */ #ifndef PHYSICENGINE_APP_H #define PHYSICENGINE_APP_H #include #include #include #include class application { private: uint32_t millisecsPreviousFrame; bool running; std::vectorparticles; timeProbe waitTime, renderTime, updateTime; double deltaTime; vec2 pushForce = vec2(0, 0); vec2 mouseCursor; const double G = 0.00000000006674; bool leftButtonPressed; public: application() : running(false), leftButtonPressed(false) {}; ~application() = default; void parseParameters(int argc, char *argv[]); bool isRunning() { return this->running; } void syncAndDeltatime(); void setup(); void input(); void update(); void render(); void destroy(); }; #endif /* PHYSICENGINE_APP_H */