Displays the UI to control MultiTouch computer vision. More...
#include <MultiStateDisplay/Display.hpp>
Public Member Functions | |
| void | addExtensionDisplay (CVExtensionDisplay *cvdisplay) |
| Adds an extension display to visualize a computer vision extension. More... | |
| void | autoCalibrate () |
| Start the auto-calibration Starts the hardware-dependent auto-calibration. | |
| bool | calibrationInProgress () |
| Check if calibration is in progress. More... | |
| void | destroy () |
| Deletes all resources, basically opposite of init(). More... | |
| Display () | |
| Constructor. | |
| void | init (MultiTouch::Screen *) |
| Initialize the display. More... | |
| void | initializeGL (Luminous::RenderContext &r) |
| Initialize the OpenGL resources.This function is thread-safe. More... | |
| bool | keyPressEvent (const Radiant::KeyEvent &event) |
| Processes a key press event. More... | |
| bool | keyReleaseEvent (const Radiant::KeyEvent &event) |
| Processes a key release event. More... | |
| bool | mouseMoveEvent (const Radiant::MouseEvent &event) |
| Processes a mouse move event. More... | |
| bool | mousePressEvent (const Radiant::MouseEvent &event) |
| Processes a mouse press event. More... | |
| bool | mouseReleaseEvent (const Radiant::MouseEvent &event) |
| Processes a mouse release event. More... | |
| bool | mouseWheelEvent (const Radiant::MouseEvent &event) |
| void | paintGL (Luminous::RenderContext &r) |
| Paint the display using OpenGL Before calling this method the system should have set the OpenGL matrices to orthonormal 2D projection (gluOrtho2D), so that the origin is in the top-left corner of the graphics window. More... | |
| bool | saveSettings () const |
| Check if the settings should be saved. More... | |
| void | saveToEEPROM () |
| Save the tracker configuration to device EEPROM. More... | |
| void | saveToFile (const QString &filename="") |
| Save the tracker configuration to a file. More... | |
| void | setLocation (Vector2i loc) |
| Set the location of the display. | |
| void | setSize (Vector2i size) |
| Set the size of the display. | |
| void | setVisible (bool visible) |
| Make the display visible/invisible. | |
| bool | timeToQuit () |
| Query the display for quit-command. More... | |
| void | update () |
| Update information from the tracker. More... | |
| void | updateGeometryAutomatically (bool automatic) |
| Make the display move/resize with mouse control By default the display can be dragged around (which happens automatically). More... | |
| bool | visible () const |
| Returns the display visibility. | |
| ~Display () | |
| Destructor. | |
Displays the UI to control MultiTouch computer vision.
| void MultiStateDisplay::Display::addExtensionDisplay | ( | CVExtensionDisplay * | cvdisplay | ) |
Adds an extension display to visualize a computer vision extension.
| cvdisplay | extension to add |
| bool MultiStateDisplay::Display::calibrationInProgress | ( | ) |
Check if calibration is in progress.
| void MultiStateDisplay::Display::destroy | ( | ) |
Deletes all resources, basically opposite of init().
May need valid OpenGL context.
| void MultiStateDisplay::Display::init | ( | MultiTouch::Screen * | ) |
Initialize the display.
This method must be called before any of the other methods.
| void MultiStateDisplay::Display::initializeGL | ( | Luminous::RenderContext & | r | ) |
Initialize the OpenGL resources.This function is thread-safe.
| r | current render context |
| bool MultiStateDisplay::Display::keyPressEvent | ( | const Radiant::KeyEvent & | event | ) |
Processes a key press event.
| event | event information |
| bool MultiStateDisplay::Display::keyReleaseEvent | ( | const Radiant::KeyEvent & | event | ) |
Processes a key release event.
| event | event information |
| bool MultiStateDisplay::Display::mouseMoveEvent | ( | const Radiant::MouseEvent & | event | ) |
Processes a mouse move event.
| event | event information |
| bool MultiStateDisplay::Display::mousePressEvent | ( | const Radiant::MouseEvent & | event | ) |
Processes a mouse press event.
| event | event information |
| bool MultiStateDisplay::Display::mouseReleaseEvent | ( | const Radiant::MouseEvent & | event | ) |
Processes a mouse release event.
| event | event information |
| bool MultiStateDisplay::Display::mouseWheelEvent | ( | const Radiant::MouseEvent & | event | ) |
| event | event information |
| void MultiStateDisplay::Display::paintGL | ( | Luminous::RenderContext & | r | ) |
Paint the display using OpenGL Before calling this method the system should have set the OpenGL matrices to orthonormal 2D projection (gluOrtho2D), so that the origin is in the top-left corner of the graphics window.
This function is thread-safe in the sense that several threads can execute it at the same time. How-ever, other function calls must not be executed at the same time.
| r | current render context |
| bool MultiStateDisplay::Display::saveSettings | ( | ) | const |
Check if the settings should be saved.
This function can be used to check if the settings should be saved when the application quits.
| void MultiStateDisplay::Display::saveToEEPROM | ( | ) |
Save the tracker configuration to device EEPROM.
Does nothing on hardware other than MT467.
| void MultiStateDisplay::Display::saveToFile | ( | const QString & | filename = "" | ) |
Save the tracker configuration to a file.
Saves the tracker configuration to the given filename. If the filename is empty, the configuration is saved to the file defined by Merge.
| filename | filename to save to |
| bool MultiStateDisplay::Display::timeToQuit | ( | ) |
Query the display for quit-command.
| void MultiStateDisplay::Display::update | ( | ) |
Update information from the tracker.
This method should be called before calling paintGL. It is
usually called from the application main thread, but it can also be caled from anywhere.
| void MultiStateDisplay::Display::updateGeometryAutomatically | ( | bool | automatic | ) |
Make the display move/resize with mouse control By default the display can be dragged around (which happens automatically).
This feature can be disabled by using this function, argument "false". Disabling might be useful, if you set the geometry of the display yourself.
| automatic | toggle to enable display move/resize |