Work in progress: move renderer state to actual class.

This commit is contained in:
2018-03-27 16:31:32 +02:00
parent 8c8d67de73
commit e8f627182f
5 changed files with 100 additions and 77 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
#include <string>
namespace fmri
{
/**
* Singleton class defining the state of the current rendering.
*
* This class manages the currently loaded data and any related visualisations.
*/
class RenderingState {
public:
/**
* Reset the rendering state
*/
void reset();
void configureRenderingContext();
void registerControls();
/**
* GLUT mouse handler function
* @param x coordinate
* @param y coordinate
*/
void handleMouseAt(int x, int y);
/**
* GLUT keyboard handler function
* @param x
*/
void handleKey(unsigned char x);
std::string infoLine();
static RenderingState& instance();
private:
float pos[3];
float angle[2];
RenderingState() noexcept = default;
void move(unsigned char key);
};
}