class MAGES::Interaction::UI::TouchModel¶
Overview¶
A model for a touch input device. More…
class TouchModel { public: // fields ButtonModel SelectButton; UnityEngine.TouchPhase TouchPhase; float Pressure; float AltitudeAngle; float AzimuthAngle; Vector2 Radius; Vector2 RadiusVariance; // properties int PointerId; Vector2 Position; Vector2 PositionDelta; // methods TouchModel(int pointerId); void OnEndOfFrame(); void CopyToEventData(PointerEventData eventData); void CopyFromEventData(PointerEventData eventData); };
Detailed Documentation¶
A model for a touch input device.
Fields¶
ButtonModel SelectButton
Virtual button for selection. (Touch only has a “button” for selecting with press, no right click and middle click).
float Pressure
Touch pressure.
Properties¶
Vector2 Position
Gets or sets the screen pixel-space coords.
Vector2 PositionDelta
Gets the movement in pixel-space since last frame.
Methods¶
void CopyToEventData(PointerEventData eventData)
Copies the touch data to the pointer event data.
Parameters:
eventData |
The event data. |
void CopyFromEventData(PointerEventData eventData)
Copies the touch data from the pointer event data.
Parameters:
eventData |
The event data. |