This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::InputEventPadTouchMotion Class

Header: #include <UnigineInput.h>
Inherits from: InputEvent

This class controls the gamepad physical touch panel event information.

InputEventPadTouchMotion Class

Перечисления (Enums)

ACTION#

ИмяОписание
ACTION_DOWN = 0Touch state is "pressed".
ACTION_MOTION = 1Touch state is "pressed and moving".
ACTION_UP = 2Touch state is "released".

Members


InputEventPadTouchMotion ( ) #

Default constructor.

InputEventPadTouchMotion ( unsigned long long timestamp, const Math::ivec2 & mouse_pos ) #

Touch panel input event constructor.

Arguments

  • unsigned long long timestamp - Timestamp of the event.
  • const Math::ivec2 & mouse_pos - Position of the mouse.

InputEventPadTouchMotion ( unsigned long long timestamp, const Math::ivec2 & mouse_pos, int connection_id, int action, int touch, int finger, float pressure, const Math::vec2 & position ) #

Touch panel input event constructor.

Arguments

  • unsigned long long timestamp - Timestamp of the event.
  • const Math::ivec2 & mouse_pos - Position of the mouse.
  • int connection_id - The connection identifier.
  • int action - The type of the touch input event, one of the ACTION_* values.
  • int touch - The index of the gamepad touch panel, the number from 0 to the total number of touch panels.
  • int finger - The index of the finger, the number from 0 to the total number of supported fingers.
  • float pressure - Pressure with which the finger is currently pressed.
  • const Math::vec2 & position - The normalized position of the touch along the axes from (0,0) to (1,1).

void setConnectionID ( int connectionid ) #

Sets the connection identifier.

Arguments

  • int connectionid - The connection identifier.

int getConnectionID ( ) const#

Returns the connection identifier.

Return value

The connection identifier.

void setAction ( InputEventPadTouchMotion::ACTION action ) #

Sets the type of the touch panel input event.

Arguments

InputEventPadTouchMotion::ACTION getAction ( ) const#

Returns the type of the touch panel input event.

Return value

The type of the touch input event, one of the ACTION_* values.

void setTouch ( int touch ) #

Sets the index of the gamepad touch panel.

Arguments

  • int touch - The index of the gamepad touch panel, the number from 0 to the total number of touch panels.

int getTouch ( ) const#

Returns the index of the gamepad touch panel.

Return value

The index of the gamepad touch panel, the number from 0 to the total number of touch panels.

void setTouchFinger ( int finger ) #

Sets the index of the finger.

Arguments

  • int finger - The index of the finger, the number from 0 to the total number of supported fingers.

int getTouchFinger ( ) const#

Returns the index of the finger.

Return value

The index of the finger, the number from 0 to the total number of supported fingers.

void setPosition ( const Math::vec2 & position ) #

Sets the touch position.

Arguments

  • const Math::vec2 & position - The normalized position of the touch along the axes from (0,0) to (1,1).

Math::vec2 getPosition ( ) const#

Returns the current touch position.

Return value

The normalized position of the touch along the axes from (0,0) to (1,1).

void setPressure ( float pressure ) #

Sets the pressure with which the finger is pressed.

Arguments

  • float pressure - The pressure with which the finger is pressed, a value from 0 (not pressed) to 1 (fully pressed).

float getPressure ( ) const#

Returns the pressure with which the finger is pressed.

Return value

The pressure with which the finger is currently pressed, a value from 0 (not pressed) to 1 (fully pressed).
Last update: 25.04.2023
Build: ()