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
| Type | Name | Description |
|---|---|---|
float | x | X coordinate relative to the left side of the view. |
float | y | Y coordinate relative to the top side of the view. |
int | id | Id 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. |
float | radiusX | X radius in pixels. Set to 0 if not applicable. |
float | radiusY | Y radius in pixels. Set to 0 if not applicable. |
float | rotationAngle | Rotation angle in radians. Set to 0 if not applicable. |
float | force | The normalized pressure of the pointer input in the range of [0,1]. Set to 0 if not applicable. |
EventFlags | modifiers | Bit flags describing any pressed modifier keys. Use “bitwise or” operator when more than one modifier is pressed. |
PointerType | pointerType | The device type that caused the event. |
TouchData(float x, float y)
Constructor
TouchData constructor
Parameters
| Type | Name | Description |
|---|---|---|
float | x | X coordinate relative to the left side of the view. |
float | y | Y 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.