|
Basic Renderer
|
The input class is closely coupled to a view to retrieve actions taken by the user directly from the underlying UIView or window that it concerns. More...
#include <Input.h>
Public Member Functions | |
| Input () | |
| Constructor. More... | |
| Input (ViewPtr view) | |
| Constructor. More... | |
| virtual | ~Input () |
| Virtual destructor. More... | |
| void | setView (ViewPtr view) |
| Set the view to get inputs from. More... | |
| GLint | getKeyState (GLint key) |
| Gets the current state of a specified key. More... | |
| GLint | getMouseButtonState (GLint button) |
| Gets the current state of a specified mouse button. More... | |
| double | getCursorPositionX () |
| Returns the current x-position of the cursor. More... | |
| double | getCursorPositionY () |
| Returns the current y-position of the cursor. More... | |
| void | getCursorPosition (double *x, double *y, bool *deviceHasCursor=nullptr) |
| Returns the current position of the cursor. More... | |
| double | getGyroscopePitch (bool *deviceHasGyroscope=nullptr) |
| Returns the pitch measured by the gyroscope of the mobile device. More... | |
| double | getGyroscopeYaw (bool *deviceHasGyroscope=nullptr) |
| Returns the yaw measured by the gyroscope of the mobile device. More... | |
| double | getGyroscopeRoll (bool *deviceHasGyroscope=nullptr) |
| Returns the roll measured by the gyroscope of the mobile device. More... | |
| TouchMap | getTouches () |
| Returns a map containing all current touches. More... | |
| bool | singleTapRecognized () |
| Returns true if a single tap was recognized since last calling the function. More... | |
| bool | doubleTapRecognized () |
| Returns true if a single tap was recognized since last calling the function. More... | |
| Touch | getLastSingleTapLocation () |
| Returns the last single tap location as a touch object. More... | |
| Touch | getLastDoubleTapLocation () |
| Returns the last double tap location as a touch object. More... | |
| void | setCursorEnabled () |
| Sets the cursor enabled. More... | |
| void | setCursorEnabled (bool enabled) |
| Sets the cursor enabled. More... | |
| void | setCursorDisabled () |
| Sets the cursor disabled. More... | |
| void | setCursorPosition (double x, double y) |
| Sets the position of the cursor. More... | |
Static Public Member Functions | |
| static bool | isTouchDevice () |
| Returns true on mobile devices like the iPad. More... | |
The input class is closely coupled to a view to retrieve actions taken by the user directly from the underlying UIView or window that it concerns.
| Input::Input | ( | ) |
Constructor.
| Input::Input | ( | ViewPtr | view | ) |
Constructor.
| [in] | view |
|
virtual |
Virtual destructor.
| bool Input::doubleTapRecognized | ( | ) |
Returns true if a single tap was recognized since last calling the function.
| void Input::getCursorPosition | ( | double * | x, |
| double * | y, | ||
| bool * | deviceHasCursor = nullptr |
||
| ) |
Returns the current position of the cursor.
| [out] | x | The x position of the cursor |
| [out] | y | The y position of the cursor |
| [out] | deviceHasCursor | Returns true if the current device has a cursor |
| double Input::getCursorPositionX | ( | ) |
Returns the current x-position of the cursor.
| double Input::getCursorPositionY | ( | ) |
Returns the current y-position of the cursor.
| double Input::getGyroscopePitch | ( | bool * | deviceHasGyroscope = nullptr | ) |
Returns the pitch measured by the gyroscope of the mobile device.
| [out] | deviceHasCursor | Returns true if the current device has a gyroscope |
| double Input::getGyroscopeRoll | ( | bool * | deviceHasGyroscope = nullptr | ) |
Returns the roll measured by the gyroscope of the mobile device.
| [out] | deviceHasCursor | Returns true if the current device has a gyroscope |
| double Input::getGyroscopeYaw | ( | bool * | deviceHasGyroscope = nullptr | ) |
Returns the yaw measured by the gyroscope of the mobile device.
| [out] | deviceHasCursor | Returns true if the current device has a gyroscope |
| GLint Input::getKeyState | ( | GLint | key | ) |
Gets the current state of a specified key.
| [in] | key |
| Touch Input::getLastDoubleTapLocation | ( | ) |
Returns the last double tap location as a touch object.
| Touch Input::getLastSingleTapLocation | ( | ) |
Returns the last single tap location as a touch object.
| GLint Input::getMouseButtonState | ( | GLint | button | ) |
Gets the current state of a specified mouse button.
| [in] | button | Left mouse button = 1, right mouse button = 2, middle mouse button = 3 |
| TouchMap Input::getTouches | ( | ) |
Returns a map containing all current touches.
|
static |
Returns true on mobile devices like the iPad.
| void Input::setCursorDisabled | ( | ) |
Sets the cursor disabled.
| void Input::setCursorEnabled | ( | ) |
Sets the cursor enabled.
| void Input::setCursorEnabled | ( | bool | enabled | ) |
Sets the cursor enabled.
| [in] | enabled | Set true to enable, set false to disable |
| void Input::setCursorPosition | ( | double | x, |
| double | y | ||
| ) |
Sets the position of the cursor.
| [in] | x | The x position of the cursor |
| [in] | y | The y position of the cursor |
|
inline |
Set the view to get inputs from.
| [in] | view |
| bool Input::singleTapRecognized | ( | ) |
Returns true if a single tap was recognized since last calling the function.