TouchData

Assembly: ZennoLab.CommandCenter
Full name: ZennoLab.CommandCenter.TouchEvents.TouchData
Kind: class


Representation of a single touch event. Touches begin with one TouchStart action followed by zero or more TouchMoved actions and finally one TouchEnded or TouchCancelled action. Events not respecting this order will be ignored.

Constructor

TouchData(float x, float y, int id, float radiusX, float radiusY, float rotationAngle, float force, EventFlags modifiers, PointerType pointerType)

Constructor

TouchData constructor

Parameters

TypeNameDescription
floatxX coordinate relative to the left side of the view.
floatyY coordinate relative to the top side of the view.
intidId of a touch point. Must be unique per touch, can be any number except -1. Note that a maximum of 16 concurrent touches will be tracked; touches beyond that will be ignored.
floatradiusXX radius in pixels. Set to 0 if not applicable.
floatradiusYY radius in pixels. Set to 0 if not applicable.
floatrotationAngleRotation angle in radians. Set to 0 if not applicable.
floatforceThe normalized pressure of the pointer input in the range of [0,1]. Set to 0 if not applicable.
EventFlagsmodifiersBit flags describing any pressed modifier keys. Use “bitwise or” operator when more than one modifier is pressed.
PointerTypepointerTypeThe device type that caused the event.

TouchData(float x, float y)

Constructor

TouchData constructor

Parameters

TypeNameDescription
floatxX coordinate relative to the left side of the view.
floatyY coordinate relative to the left side of the view.

Properties

X

Property

float X { get; set; }

X coordinate

Y

Property

float Y { get; set; }

Y coordinate

RadiusX

Property

float RadiusX { get; set; }

Radius of touch by X axis

RadiusY

Property

float RadiusY { get; set; }

Radius of touch by Y axis

RotationAngle

Property

float RotationAngle { get; set; }

Rotation angle of touch

Force

Property

float Force { get; set; }

Force of touch

Id

Property

int Id { get; set; }

Id of touch

Modifiers

Property

EventFlags Modifiers { get; set; }

Bit flags describing any pressed modifier keys. Use “bitwise or” operator when more than one modifier is pressed.

PointerType

Property

PointerType PointerType { get; set; }

The device type that caused the event.