app.h 708 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * 2D Physic Engine
  3. * app.h:
  4. * Based on pikuma.com Learn Game Physics Engine Programming course.
  5. * Copyright (c) 2022 986-Studio. All rights reserved.
  6. *
  7. * Created by Manoël Trapier on 07/06/2022.
  8. */
  9. #ifndef PHYSICENGINE_APP_H
  10. #define PHYSICENGINE_APP_H
  11. #include <physics/particle.h>
  12. class application
  13. {
  14. private:
  15. uint32_t millisecsPreviousFrame;
  16. bool running;
  17. particle *part;
  18. public:
  19. application() : running(false) {};
  20. ~application() = default;
  21. void parseParameters(int argc, char *argv[]);
  22. bool isRunning() { return this->running; }
  23. void setup();
  24. void input();
  25. void update();
  26. void render();
  27. void destroy();
  28. };
  29. #endif /* PHYSICENGINE_APP_H */