Skip to main content

Class: PointerData

PathBuilding.PointerData(point)

Contains the pointer input data associated with a pointer event

Constructor

new PointerData(point)

Parameters:
NameTypeDescription
pointInkInput.SensorPointPointer data
Properties:
NameTypeAttributesDescription
xintPointer x coordinate
yintPointer y coordinate
zint<optional>Pointer z coordinate
timestamplongTime when is gathered event
pressurefloat<optional>The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively
forcefloat<optional>Pressure alias
radiusXfloat<optional>Touch radius - x radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenX.
radiusYfloat<optional>Touch radius - y radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenY.
altitudefloat<optional>Rhe angular elevation of a celestial object above the horizon
azimuthfloat<optional>Horizontal direction expressed as the angular distance between the direction of a fixed point (such as the observer's heading) and the direction of the object
rotationfloat<optional>Value representing the amount of twist, in radians, applied to the transducer (pointer). The value is in the range 0 to 2 * Pi, inclusive.For devices that do not report twist, the value is 0.
phasePathBuilding.Pipeline.PhaseEvent phase representation
pointerInkInput.Pointer<optional>Describes where this pointer data comes from

Since:

  • version 3.0

Methods

computeNearestAzimuthAngle(previous) → {float}

Computes an azimuth angle that is at the smallest absolute distance from the previous point's azimuth angle

Parameters:
NameTypeDescription
previousPathBuilding.PointerDataThe previous pointer data
Returns:

The computed azimuth angle

Type

float

computeSpeed(previous, next) → {float}

Calculates the speed of the pointer movement based on positions and timestamps of the current pointer data and its neighbours

Parameters:
NameTypeDescription
previousPathBuilding.PointerDataPrevious pointer data
nextPathBuilding.PointerDataNext pointer data
Returns:

The speed

Type

float

getDelta(previous, next) → PathBuilding.PointerDataDelta

Calculates delta distance and time between 2 points

Parameters:
NameTypeDescription
previousPathBuilding.PointerDataPrevious pointer data
nextPathBuilding.PointerDataNext pointer data
Returns:

Delta distance and time between 2 points

Type

PathBuilding.PointerDataDelta

(static) computeSpeed(delta) → {float}

Calculates the speed of the pointer movement based on delta vector

Parameters:
NameTypeDescription
deltaPathBuilding.PointerDataDelta
Returns:

The speed

Type

float

(static) normalizeSpeed(speed, minNormSpeed, maxNormSpeed, minSpeedopt, maxSpeedopt) → {float}

Normalize speed

Parameters:
NameTypeAttributesDefaultDescription
speedfloatPointer speed
minNormSpeedfloatMin normalized speed value
maxNormSpeedfloatMax normalized speed value
minSpeedfloat<optional>0Min speed value
maxSpeedfloat<optional>4000Max speed value
Returns:

Normalized speed

Type

float

Type Definitions

Property

Pointer data properties

Properties:
NameTypeDescription
XobjectPointer X coordinate
YobjectPointer Y coordinate
ZobjectPointer Z coordinate
PHASEobjectStroke phase
TIMESTAMPobjectTimestamp of the pointer event
PRESSUREobjectPointer Pressure / Force
RADIUS_XobjectTouch radius - X radius of the ellipse that most closely circumscribes the area of contact with the screen
RADIUS_YobjectTouch radius - Y radius of the ellipse that most closely circumscribes the area of contact with the screen
ALTITUDEobjectPen altitude angle
AZIMUTHobjectPen azimuth angle
ROTATIONobjectPen rotation angle

Home