Click or drag to resize

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.

Inheritance Hierarchy

Namespace:  TouchScript.Pointers
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class Pointer : IPointer, IEquatable<Pointer>

The Pointer type exposes the following members.

Constructors
  NameDescription
Public methodPointer
Initializes a new instance of the Pointer class.
Top
Properties
  NameDescription
Public propertyButtons
Current buttons state of the pointer.
Public propertyFlags

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.

Public propertyId
Internal unique pointer id.
Public propertyInputSource
Original input source which created this pointer.
Public propertyPosition
Current position in screen coordinates.
Public propertyPreviousPosition
Previous position in screen coordinates.
Public propertyProjectionParams
Projection parameters for the layer which created this pointer.
Public propertyType
Top
Methods
Fields
  NameDescription
Public fieldStatic memberFLAG_ARTIFICIAL
This pointer is generated by script and is not mapped to any device input.
Public fieldStatic memberFLAG_INTERNAL
This pointer is internal and shouldn't be shown on screen.
Public fieldStatic memberFLAG_RETURNED
This pointer was returned to the system after it was cancelled.
Public fieldStatic memberINVALID_POINTER
Invalid pointer id.
Top
See Also