ComputerGraphik TU WIEN
bubbleCursor.hpp
Go to the documentation of this file.
1 #ifndef BUBBLECURSOR_HPP
2 #define BUBBLECURSOR_HPP
3 
4 #include <glm/vec2.hpp>
5 #include <glm/glm.hpp>
6 #include <glm/gtx/epsilon.hpp>
7 #include <GL/glew.h>
8 #include <GLFW/glfw3.h>
9 
10 #include "sceneObject.hpp"
11 #include "shader.hpp"
12 #include "texture.hpp"
13 
14 #define MOUSE_MIN_MOVE 0.3
15 #define MOUSE_MAX_MOVE 3.5
16 #define MOUSE_CUTOFF 200
17 #define BUBBLE_POINTS 50
18 
20 
47 class BubbleCursor : public SceneObject {
48 private:
49  glm::vec2 latestPos;
50  int distance;
51  GLFWwindow *window;
52  GLuint vboPositions;
54  std::vector<glm::vec2> population;
56 
57 public:
58  BubbleCursor(Scene* scene, Texture* texture);
59  virtual ~BubbleCursor();
60 
61  void draw();
62  void setShader(Shader *shader);
63  void update(double deltaT);
64 
65  void updateDistanceState(unsigned int _distance);
67  void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mode);
68 
69  bool drawingEnabled();
70  unsigned int getDistance() { return distance; };
71 };
72 
73 #endif //MOUSESEMANTICS_HPP
void update(double deltaT)
Definition: bubbleCursor.cpp:78
std::vector< glm::vec2 > population
Definition: bubbleCursor.hpp:54
bool enableDrawing
Definition: bubbleCursor.hpp:55
void generateRandomPopulation()
Definition: bubbleCursor.cpp:61
GLuint vboPositions
Definition: bubbleCursor.hpp:52
void setShader(Shader *shader)
Definition: bubbleCursor.cpp:36
void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mode)
Definition: bubbleCursor.cpp:84
BubbleCursor(Scene *scene, Texture *texture)
Definition: bubbleCursor.cpp:18
unsigned int getDistance()
Definition: bubbleCursor.hpp:70
Encapsulates the Rendering Engine, holds a complete scene and it's assets.
Definition: scene.hpp:71
Scene * scene
Definition: sceneObject.hpp:68
virtual ~BubbleCursor()
Definition: bubbleCursor.cpp:27
Encapsulates a texture in the GPU.
Definition: texture.hpp:10
void updateDistanceState(unsigned int _distance)
Definition: bubbleCursor.cpp:32
glm::vec2 latestPos
Definition: bubbleCursor.hpp:49
This class is rendering multiple circles (called bubbles in the paper) that are randomly placed on th...
Definition: bubbleCursor.hpp:47
Encapsulates a shader program.
Definition: shader.hpp:9
Texture * texture
Definition: bubbleCursor.hpp:53
int distance
Definition: bubbleCursor.hpp:50
The base class of the objects which are rendered.
Definition: sceneObject.hpp:30
void draw()
Definition: bubbleCursor.cpp:95
Shader * shader
Definition: sceneObject.hpp:70
GLFWwindow * window
Definition: bubbleCursor.hpp:51
bool drawingEnabled()
Definition: bubbleCursor.cpp:91