ComputerGraphik TU WIEN
selectorQuadTree.hpp
Go to the documentation of this file.
1 #ifndef SELECTORQUADTREE_HPP
2 #define SELECTORQUADTREE_HPP
3 
4 #include <string>
5 #include <vector>
6 
7 #include "selectorBase.hpp"
8 
10 
106 public:
107  SelectorQuadTree(const std::string& name, Scene* scene);
109 
110  void changeMode();
111  void update(double deltaT);
112  void pickObject(const glm::ivec2& mouse);
113 
114 private:
115  class Node;
116 
117  int maskBit;
118  int treeSize;
119  std::vector<Node> nodes;
120  std::vector<GLshort> screen;
121 };
122 
123 #endif //SELECTORQUADTREE_HPP
void changeMode()
debug, nothing
Definition: selectorQuadTree.cpp:52
Definition: selectorQuadTree.cpp:13
void update(double deltaT)
build up quadtree
Definition: selectorQuadTree.cpp:57
int treeSize
size of tree
Definition: selectorQuadTree.hpp:118
~SelectorQuadTree()
Definition: selectorQuadTree.cpp:47
Encapsulates the Rendering Engine, holds a complete scene and it's assets.
Definition: scene.hpp:71
Scene * scene
Definition: sceneObject.hpp:68
std::vector< GLshort > screen
buffer to store the pick buffer
Definition: selectorQuadTree.hpp:120
std::vector< Node > nodes
container to store quadtree nodes
Definition: selectorQuadTree.hpp:119
std::string name
Definition: sceneObject.hpp:73
SelectorQuadTree(const std::string &name, Scene *scene)
Definition: selectorQuadTree.cpp:35
Implements the QuadTree based object selection.
Definition: selectorQuadTree.hpp:105
int maskBit
2^maskbit = treeSize
Definition: selectorQuadTree.hpp:115
void pickObject(const glm::ivec2 &mouse)
select closest object to mouse
Definition: selectorQuadTree.cpp:111
Base class for selectors.
Definition: selectorBase.hpp:15