Functions

Input/Devices

Brief descriptions

Functions

nau::input::getKeyboardDeviceCount

Retrieves the number of currently registered keyboard devices.

nau::input::isKeyboardButtonPressed

Checks whether the keyboard button has just been pressed.

nau::input::isKeyboardButtonHold

Checks whether the keyboard button is being held down currently.

nau::input::getMouseDeviceCount

Retrieves the number of currently registered mouse devices.

nau::input::isMouseButtonPressed

Checks if the mouse button has just been pressed.

nau::input::isMouseButtonReleased

Checks if the mouse button has just been released.

nau::input::isMouseButtonHold

Checks whether the mouse button is being held down currently.

nau::input::getMouseAxisValue

Retrieves the mouse axis absolute value.

nau::input::getMouseAxisDelta

Retrieves the mouse axis delta value.

Detailed information

input::getKeyboardDeviceCount

engine/core/modules/input/include/nau/input.h

int nau::input::getKeyboardDeviceCount()

Retrieves the number of currently registered keyboard devices.

Returns:

Number of keyboard devices.


input::isKeyboardButtonPressed

engine/core/modules/input/include/nau/input.h

bool nau::input::isKeyboardButtonPressed(int deviceId, nau::input::Key key)

Checks whether the keyboard button has just been pressed.

Parameters:
  • deviceId[in] Index of the device to check.

  • key[in] Code of the button to check.

Returns:

true if the button has changed its state from ‘Pressed’ to ‘Released’ within this frame, false otherwise.


input::isKeyboardButtonHold

engine/core/modules/input/include/nau/input.h

bool nau::input::isKeyboardButtonHold(int deviceId, nau::input::Key key)

Checks whether the keyboard button is being held down currently.

Parameters:
  • deviceId[in] Index of the device to check.

  • key[in] Code of the button to check.

Returns:

true if the button is in ‘Pressed’ state, false otherwise.


input::getMouseDeviceCount

engine/core/modules/input/include/nau/input.h

int nau::input::getMouseDeviceCount()

Retrieves the number of currently registered mouse devices.

Returns:

Number of mouse devices.


input::isMouseButtonPressed

engine/core/modules/input/include/nau/input.h

bool nau::input::isMouseButtonPressed(int deviceId, nau::input::MouseKey key)

Checks if the mouse button has just been pressed.

Parameters:
  • deviceId[in] Index of the device to check.

  • key[in] Code of the button to check.

Returns:

true if the button has changed its state from ‘Pressed’ to ‘Released’ within this frame, false otherwise.


input::isMouseButtonReleased

engine/core/modules/input/include/nau/input.h

bool nau::input::isMouseButtonReleased(int deviceId, nau::input::MouseKey key)

Checks if the mouse button has just been released.

Parameters:
  • deviceId[in] Index of the device to check.

  • key[in] Code of the button to check.

Returns:

true if the button has changed its state from ‘Released’ to ‘Pressed’ within this frame, false otherwise.


input::isMouseButtonHold

engine/core/modules/input/include/nau/input.h

bool nau::input::isMouseButtonHold(int deviceId, nau::input::MouseKey key)

Checks whether the mouse button is being held down currently.

Parameters:
  • deviceId[in] Index of the device to check.

  • key[in] Code of the button to check.

Returns:

true if the button is in ‘Pressed’ state, false otherwise.


input::getMouseAxisValue

engine/core/modules/input/include/nau/input.h

float nau::input::getMouseAxisValue(int deviceId, nau::input::MouseKey key)

Retrieves the mouse axis absolute value.

Parameters:
Returns:

Absolute axis value.


input::getMouseAxisDelta

engine/core/modules/input/include/nau/input.h

float nau::input::getMouseAxisDelta(int deviceId, nau::input::MouseKey key)

Retrieves the mouse axis delta value.

Parameters:
Returns:

Difference between the current value of the axis and its value in the previous frame.