1 #ifndef MOUSESEMANTICS_HPP
2 #define MOUSESEMANTICS_HPP
4 #include <glm/vec2.hpp>
6 #include <glm/gtx/epsilon.hpp>
8 #include <GLFW/glfw3.h>
14 #define MOUSE_MIN_MOVE 0.3
15 #define MOUSE_MAX_MOVE 3.5
16 #define MOUSE_CUTOFF 200
74 void update(
double deltaT);
78 void keyCallback(GLFWwindow *window,
int key,
int scancode,
int action,
int mods);
85 std::string
scaleFunction() {
if (inverseScaleFunction)
return "inverse";
else return "standard"; }
91 #endif //MOUSESEMANTICS_HPP
bool inWindow
Definition: mouseSemantics.hpp:58
float getScaleFactor()
Definition: mouseSemantics.hpp:86
glm::vec2 latestPos
Definition: mouseSemantics.hpp:51
void setShader(Shader *shader)
Definition: mouseSemantics.cpp:43
Texture * texture
Definition: mouseSemantics.hpp:64
bool firstTimeInWindow
Definition: mouseSemantics.hpp:59
bool scaleLinear
Definition: mouseSemantics.hpp:57
MouseSemantics(Scene *scene, float _M, float _C, float _m, Texture *texture)
Definition: mouseSemantics.cpp:13
bool inverseScaleFunction
Definition: mouseSemantics.hpp:61
float calculateScaleFactor()
Definition: mouseSemantics.cpp:148
void cursorEnterCallBack(GLFWwindow *window, int entered)
Definition: mouseSemantics.cpp:68
GLFWwindow * window
Definition: mouseSemantics.hpp:62
float C
Definition: mouseSemantics.hpp:54
float M
Definition: mouseSemantics.hpp:53
std::string scaleFunction()
Definition: mouseSemantics.hpp:85
glm::ivec2 getMousePos()
Definition: mouseSemantics.hpp:88
virtual ~MouseSemantics()
Definition: mouseSemantics.cpp:30
Encapsulates the Rendering Engine, holds a complete scene and it's assets.
Definition: scene.hpp:71
Scene * scene
Definition: sceneObject.hpp:68
float additionalScaling
Definition: mouseSemantics.hpp:56
int distance
Definition: mouseSemantics.hpp:52
void updateDistanceState(unsigned int _distance)
Definition: mouseSemantics.cpp:39
Encapsulates a texture in the GPU.
Definition: texture.hpp:10
unsigned int getDistance()
Definition: mouseSemantics.hpp:84
Encapsulates a shader program.
Definition: shader.hpp:9
void update(double deltaT)
Definition: mouseSemantics.cpp:100
GLuint vboPositions
Definition: mouseSemantics.hpp:63
void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
Definition: mouseSemantics.cpp:88
float getSpeed()
Definition: mouseSemantics.hpp:87
bool focused
Definition: mouseSemantics.hpp:60
The base class of the objects which are rendered.
Definition: sceneObject.hpp:30
void windowFocusCallBack(GLFWwindow *window, int entered)
Definition: mouseSemantics.cpp:79
Shader * shader
Definition: sceneObject.hpp:70
The class which handles the drawing of the cursor as well as the semantic scaling function that trans...
Definition: mouseSemantics.hpp:49
void draw()
Definition: mouseSemantics.cpp:166
void toggleScaleFunction()
Definition: mouseSemantics.cpp:35
float m
Definition: mouseSemantics.hpp:55