Pointer Class |
Representation of a pointer (touch, mouse) within TouchScript.
An instance of this class is created when user touches the screen. A unique id is assigned to it which doesn't change throughout its life.
Attention! Do not store references to these objects beyond pointer's lifetime (i.e. when target finger is lifted off). These objects may be reused internally. Store unique ids instead.
Namespace: TouchScript.Pointers
public class Pointer : IPointer, IEquatable<Pointer>
The Pointer type exposes the following members.
Name | Description | |
---|---|---|
Buttons |
Current buttons state of the pointer.
| |
Flags | Gets or sets pointer flags: [!:FLAG_ARTIFICIAL] Note: setting this property doesn't immediately change its value, the value actually changes during the next TouchManager update phase. | |
Id |
Internal unique pointer id.
| |
InputSource |
Original input source which created this pointer.
| |
Position |
Current position in screen coordinates.
| |
PreviousPosition |
Previous position in screen coordinates.
| |
ProjectionParams |
Projection parameters for the layer which created this pointer.
| |
Type |
Pointer type. See PointerPointerType.
|
Name | Description | |
---|---|---|
CopyFrom |
Copies values from the target.
| |
Equals(Object) | (Overrides ObjectEquals(Object).) | |
Equals(Pointer) | ||
GetHashCode | (Overrides ObjectGetHashCode.) | |
GetOverData |
Returns HitData for current pointer position, i.e. what is right beneath it. Caches the result for the entire frame.
| |
GetPressData | ||
ToString | (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
FLAG_ARTIFICIAL |
This pointer is generated by script and is not mapped to any device input.
| |
FLAG_INTERNAL |
This pointer is internal and shouldn't be shown on screen.
| |
FLAG_RETURNED |
This pointer was returned to the system after it was cancelled.
| |
INVALID_POINTER |
Invalid pointer id.
|