2023-05-26 21:41:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
2023-05-27 17:11:46 +00:00
|
|
|
#include <chrono>
|
2023-05-26 21:41:51 +00:00
|
|
|
|
|
|
|
#include "../renderer/renderer.hpp"
|
|
|
|
#include "../callback.hpp"
|
|
|
|
#include "../node/node.hpp"
|
|
|
|
|
|
|
|
namespace hibis {
|
|
|
|
class Engine {
|
|
|
|
public:
|
|
|
|
Engine(Renderer* renderer, LoggerCallback logger);
|
|
|
|
~Engine();
|
|
|
|
|
|
|
|
void runNodeProcesses();
|
|
|
|
|
|
|
|
void runNodePhysicsProcesses();
|
|
|
|
|
|
|
|
void drawNodes();
|
|
|
|
|
|
|
|
const char* getEngineVersion();
|
|
|
|
private:
|
2023-05-27 19:47:34 +00:00
|
|
|
Renderer* mRenderer;
|
2023-05-26 21:41:51 +00:00
|
|
|
//StopWatch watch;
|
2023-05-27 19:47:34 +00:00
|
|
|
std::chrono::time_point<std::chrono::steady_clock> mPreviousProcessTick;
|
|
|
|
std::chrono::time_point<std::chrono::steady_clock> mPreviousPhysicsProcessTick;
|
2023-05-26 21:41:51 +00:00
|
|
|
|
2023-05-27 19:47:34 +00:00
|
|
|
std::vector<Node*> mNodeList;
|
|
|
|
LoggerCallback mLoggerCallback;
|
2023-05-26 21:41:51 +00:00
|
|
|
};
|
|
|
|
}
|