ComputerGraphik TU WIEN
selector.hpp
Go to the documentation of this file.
1 #ifndef SELECTOR_HPP
2 #define SELECTOR_HPP
3 
4 #include "sceneObject.hpp"
5 
6 #include <string>
7 #include <vector>
8 
10 class Selector : public SceneObject {
11 public:
12  Selector(const std::string& name, Scene* scene);
13  ~Selector();
14 
15  virtual void reset();
16  virtual void draw() const;
17  virtual void update(double deltaT);
18  virtual void pickObject(const glm::ivec2& mouse);
19 
20  int getBufferWidth() const { return width; }
21  int getBufferHeight() const { return height; }
22  size_t getLastSelected() const { return lastSelected; }
23  size_t getLastDistance() const { return lastDistance; }
24 
25 protected:
26  int width;
27  int height;
28  GLuint idBuffer;
29  GLuint idTexture;
30 
31  size_t lastDistance;
32  size_t lastSelected;
33 
34 };
35 
36 #endif //SELECTOR_HPP
int height
Definition: selector.hpp:27
int getBufferHeight() const
Definition: selector.hpp:21
~Selector()
Definition: selector.cpp:8
size_t lastDistance
Definition: selector.hpp:31
virtual void update(double deltaT)
virtual void pickObject(const glm::ivec2 &mouse)
size_t getLastDistance() const
Definition: selector.hpp:23
GLuint idTexture
Definition: selector.hpp:29
virtual void reset()
Encapsulates the Rendering Engine, holds a complete scene and it's assets.
Definition: scene.hpp:71
Scene * scene
Definition: sceneObject.hpp:68
size_t lastSelected
Definition: selector.hpp:32
int width
Definition: selector.hpp:26
Selector(const std::string &name, Scene *scene)
Definition: selector.cpp:3
std::string name
Definition: sceneObject.hpp:73
GLuint idBuffer
Definition: selector.hpp:28
int getBufferWidth() const
Definition: selector.hpp:20
The base class of the objects which are rendered.
Definition: sceneObject.hpp:30
virtual void draw() const
TODO.
Definition: selector.hpp:10
size_t getLastSelected() const
Definition: selector.hpp:22