|
ComputerGraphik TU WIEN
|
Implements a simple object selection. More...
#include <selectorSimple.hpp>
Public Member Functions | |
| SelectorSimple (const std::string &name, Scene *scene) | |
| ~SelectorSimple () | |
| void | changeMode () |
| debug, change window size More... | |
| void | pickObject (const glm::ivec2 &mouse) |
| Select closest object to mouse. More... | |
Public Member Functions inherited from SelectorBase | |
| SelectorBase (const std::string &name, Scene *scene) | |
| ~SelectorBase () | |
| void | reset () |
| set up EffectObject More... | |
| void | draw () const |
| draw selectable object ids into a texture More... | |
| void | update (double deltaT) |
| empty function More... | |
| int | getBufferWidth () const |
| int | getBufferHeight () const |
| size_t | getLastSelected () const |
| size_t | getLastDistance () const |
Public Member Functions inherited from SceneObject | |
| SceneObject (std::shared_ptr< SceneObject > &effectParent, const glm::mat4 &modelMatrix=glm::mat4(1)) | |
| SceneObject (const std::string &name, Scene *scene=0, Model *model=0, const glm::mat4 &modelMatrix=glm::mat4(1)) | |
| virtual | ~SceneObject () |
| Model * | getModel () const |
| Shader * | getShader () const |
| glm::mat4 | getModelMatrix () const |
| glm::mat4 | getGlobalModelMatrix () const |
| std::string | getName () const |
| std::shared_ptr< SceneObject > | getParent () const |
| void | setAnimationTime (double time) |
| bool | setAnimation (const Animation &anim) |
| bool | delChild (size_t idx) |
| bool | getChild (size_t idx, std::shared_ptr< SceneObject > &child) const |
| bool | addChild (std::shared_ptr< SceneObject > &child) |
| bool | remEffect (const std::string &name) |
| SceneObject * | getEffect (const std::string &name) const |
| bool | addEffect (const std::string &name, std::unique_ptr< SceneObject > &effect) |
| bool | doNotRender () |
| bool | getIsVolSun () |
| virtual bool | animate (double time) |
| virtual void | setShader (Shader *val) |
Private Attributes | |
| int | mode |
| debug, help to set window More... | |
| int | windowX |
| number of pixels in window More... | |
| int | windowY |
| number of pixels in window More... | |
| std::vector< GLshort > | screen |
| Buffer to store texture on CPU. More... | |
Additional Inherited Members | |
Public Types inherited from SceneObject | |
| typedef std::vector< std::pair< double, glm::mat4 > > | Animation |
Protected Attributes inherited from SelectorBase | |
| int | width |
| width of screen More... | |
| int | height |
| height of screen More... | |
| GLuint | idBuffer |
| frame buffer More... | |
| GLuint | idTexture |
| texture of rendered object indices More... | |
| size_t | lastDistance |
| distance after pickObject() call More... | |
| size_t | lastSelected |
| selected object id after pickObject() call More... | |
Protected Attributes inherited from SceneObject | |
| GLuint | vao |
| Scene * | scene |
| Model * | model |
| Shader * | shader |
| glm::mat4 | modelMatrix |
| std::string | name |
| std::weak_ptr< SceneObject > | parent |
| std::vector< std::shared_ptr< SceneObject > > | childs |
| std::map< std::string, std::unique_ptr< SceneObject > > | effectChilds |
| size_t | animIDX |
| Animation | animation |
| bool | norender |
| bool | isVolSun |
Implements a simple object selection.
First it copies the complete pick buffer, then in a window centered at the mouse position, it searches the closest object.
| SelectorSimple::SelectorSimple | ( | const std::string & | name, |
| Scene * | scene | ||
| ) |
| SelectorSimple::~SelectorSimple | ( | ) |
|
virtual |
debug, change window size
Implements SelectorBase.
|
virtual |
Select closest object to mouse.
Implements SelectorBase.
|
private |
debug, help to set window
|
private |
Buffer to store texture on CPU.
|
private |
number of pixels in window
|
private |
number of pixels in window
1.8.9.1