2#include "system/Config.hpp"
3#include "input/ControllableCamera.hpp"
4#include "renderers/DebugViewer.hpp"
99 virtual void update()
override;
122 const double _dt = 1.0 / 120.0;
Base structure of an application.
Definition: Application.hpp:12
virtual void update()
Definition: Application.cpp:32
Window & _window
The application main window.
Definition: Application.hpp:72
static const size_t _framesCount
Frames to average over for FPS display.
Definition: Application.hpp:78
double _startTime
TImer value at app start.
Definition: Application.hpp:75
Application & operator=(const Application &)=delete
double _smoothTime
Time elapsed over the last N frames.
Definition: Application.hpp:80
size_t _currFrame
Current frame index for smoothing.
Definition: Application.hpp:81
virtual void finish()
Definition: Application.cpp:68
double _timer
Absolute timer.
Definition: Application.hpp:74
virtual ~Application()
Definition: Application.cpp:26
double _frameTime
Last frame duration.
Definition: Application.hpp:76
Application(Application &&)=delete
Application & operator=(Application &&)=delete
double frameTime()
Definition: Application.cpp:87
std::array< double, _framesCount > _frameTimes
Last N frame times.
Definition: Application.hpp:79
std::unique_ptr< DebugViewer > _debug
Debug viewer.
Definition: Application.hpp:68
Window & window()
Definition: Application.cpp:95
bool _showDebug
Show debug viewer.
Definition: Application.hpp:82
double frameRate()
Definition: Application.cpp:91
double timeElapsed()
Definition: Application.cpp:83
RenderingConfig & _config
The current configuration.
Definition: Application.hpp:66
Application(const Application &)=delete
Application with an interactive camera.
Definition: Application.hpp:89
double _fullTime
Time elapsed since the app launch.
Definition: Application.hpp:120
void freezeCamera(bool shouldFreeze)
Definition: Application.cpp:131
double _remainingTime
Remaining accumulated time to process.
Definition: Application.hpp:121
virtual void physics(double fullTime, double frameTime)
Definition: Application.cpp:127
const double _dt
Small physics timestep.
Definition: Application.hpp:122
virtual void update() override
Definition: Application.cpp:103
ControllableCamera _userCamera
The interactive camera.
Definition: Application.hpp:115
bool _freezeCamera
Should the camera be frozen.
Definition: Application.hpp:119
This camera can be controlled through the inputs received from the user.
Definition: ControllableCamera.hpp:10
Configuration containing parameters for windows and renderers.
Definition: Config.hpp:113
Represent an OS window and its associated rendering context.
Definition: Window.hpp:14