The BLOCKS SDK
TouchSurface::Touch Struct Reference

Public Attributes

int index
 A touch index, which will stay constant for each finger as it is tracked. More...
 
float x
 The X position of this touch on the device, in logical units starting from 0 (left). More...
 
float xVelocity
 An approximation of the velocity at which the X value is changing, measured in units/second. More...
 
float y
 The Y position of this touch on the device, in logical units starting from 0 (top). More...
 
float yVelocity
 An approximation of the velocity at which the Y value is changing, measured in units/second. More...
 
float z
 The current pressure of this touch, in the range 0.0 (no pressure) to 1.o (very hard). More...
 
float zVelocity
 The rate at which pressure is currently changing, measured in units/second. More...
 
Block::Timestamp eventTimestamp
 The timestamp of this event, in milliseconds since the device was booted. More...
 
bool isTouchStart
 True if this is the first event for this finger/index. More...
 
bool isTouchEnd
 True if this is the final event as this finger/index is lifted off. More...
 
Block::UID blockUID
 The ID of the block that generated this touch. More...
 
float startX
 The initial X position of the touchStart event corresponding to this finger/index. More...
 
float startY
 The initial Y position of the touchStart event corresponding to this finger/index. More...
 

Member Data Documentation

§ index

int TouchSurface::Touch::index

A touch index, which will stay constant for each finger as it is tracked.

Referenced by TouchList< Type >::clear().

§ x

float TouchSurface::Touch::x

The X position of this touch on the device, in logical units starting from 0 (left).

See Block::getWidth() for the maximum X value on the device.

§ xVelocity

float TouchSurface::Touch::xVelocity

An approximation of the velocity at which the X value is changing, measured in units/second.

This is intended as a useful hint to help with gesture detection, but may be 0 if the device doesn't provide this data.

§ y

float TouchSurface::Touch::y

The Y position of this touch on the device, in logical units starting from 0 (top).

See Block::getHeight() to find the maximum Y on the device.

§ yVelocity

float TouchSurface::Touch::yVelocity

An approximation of the velocity at which the Y value is changing, measured in units/second.

This is intended as a useful hint to help with gesture detection, but may be 0 if the device doesn't provide this data.

§ z

float TouchSurface::Touch::z

The current pressure of this touch, in the range 0.0 (no pressure) to 1.o (very hard).

§ zVelocity

float TouchSurface::Touch::zVelocity

The rate at which pressure is currently changing, measured in units/second.

This is intended as a useful hint to help with gesture detection, but may be 0 if the device doesn't provide this data.

§ eventTimestamp

Block::Timestamp TouchSurface::Touch::eventTimestamp

The timestamp of this event, in milliseconds since the device was booted.

§ isTouchStart

bool TouchSurface::Touch::isTouchStart

True if this is the first event for this finger/index.

§ isTouchEnd

bool TouchSurface::Touch::isTouchEnd

True if this is the final event as this finger/index is lifted off.

Referenced by TouchList< Type >::updateTouch().

§ blockUID

Block::UID TouchSurface::Touch::blockUID

The ID of the block that generated this touch.

Referenced by TouchList< Type >::clear().

§ startX

float TouchSurface::Touch::startX

The initial X position of the touchStart event corresponding to this finger/index.

§ startY

float TouchSurface::Touch::startY

The initial Y position of the touchStart event corresponding to this finger/index.


The documentation for this struct was generated from the following file: