MyScript Interactive Ink SDK 4.3.0
Public Member Functions | Public Attributes | List of all members
myscript::iink::PointerEvent Struct Reference

#include <PointerEvent.h>

Public Member Functions

 PointerEvent ()=default
 
PointerEvent & down (float x, float y)
 
PointerEvent & move (float x, float y)
 
PointerEvent & up (float x, float y)
 
PointerEvent & timestamp (int64_t t)
 
PointerEvent & force (float f)
 
PointerEvent & tiltAngle (float tilt)
 
PointerEvent & orientationAngle (float orientation)
 
PointerEvent & type (PointerType pointerType)
 
PointerEvent & id (int pointerId)
 
bool hasTiltAndOrientation () const
 

Public Attributes

PointerEventType eventType = PointerEventType::CANCEL
 
float x = 0.f
 
float y = 0.f
 
int64_t t = -1
 
float f = 1.f
 
float tilt = -1.f
 
float orientation = -10.f
 
PointerType pointerType = PointerType::PEN
 
int pointerId = -1
 

Detailed Description

Represents a pointer event.

Constructor & Destructor Documentation

◆ PointerEvent()

myscript::iink::PointerEvent::PointerEvent ( )
default

Member Function Documentation

◆ down()

PointerEvent & myscript::iink::PointerEvent::down ( float  x,
float  y 
)
inline

Update this event to a "down" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ move()

PointerEvent & myscript::iink::PointerEvent::move ( float  x,
float  y 
)
inline

Update this event to a "move" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ up()

PointerEvent & myscript::iink::PointerEvent::up ( float  x,
float  y 
)
inline

Update this event to a "up" event.

Parameters
xthe x coordinate location.
ythe y coordinate location.
Returns
this.

◆ timestamp()

PointerEvent & myscript::iink::PointerEvent::timestamp ( int64_t  t)
inline

Update the event timestamp.

Parameters
tthe timestamp value.
Returns
this.

◆ force()

PointerEvent & myscript::iink::PointerEvent::force ( float  f)
inline

Update the event pressure.

Parameters
fthe pressure value.
Returns
this.

◆ tiltAngle()

PointerEvent & myscript::iink::PointerEvent::tiltAngle ( float  tilt)
inline

Update the event tilt angle.

Parameters
tiltthe tilt value.
Returns
this.
Since
4.0

◆ orientationAngle()

PointerEvent & myscript::iink::PointerEvent::orientationAngle ( float  orientation)
inline

Update the event orientation angle.

Parameters
orientationthe orientation value.
Returns
this.
Since
4.0

◆ type()

PointerEvent & myscript::iink::PointerEvent::type ( PointerType  pointerType)
inline

Update the event pointer type.

Parameters
pointerTypethe pointer type.
Returns
this.

◆ id()

PointerEvent & myscript::iink::PointerEvent::id ( int  pointerId)
inline

Update the event pointer id.

Parameters
pointerIdthe pointer id value.
Returns
this.

◆ hasTiltAndOrientation()

bool myscript::iink::PointerEvent::hasTiltAndOrientation ( ) const

Check whether the event has tilt and orientation information.

Returns
true if the event has tilt and orientation info, otherwise false.
Since
4.0

Member Data Documentation

◆ eventType

PointerEventType myscript::iink::PointerEvent::eventType = PointerEventType::CANCEL

The event type.

◆ x

float myscript::iink::PointerEvent::x = 0.f

The event x coordinate.

◆ y

float myscript::iink::PointerEvent::y = 0.f

The event y coordinate.

◆ t

int64_t myscript::iink::PointerEvent::t = -1

The event timestamp in ms since Unix EPOCH, or -1.

◆ f

float myscript::iink::PointerEvent::f = 1.f

The event normalized pressure, in [0,1].

◆ tilt

float myscript::iink::PointerEvent::tilt = -1.f

The event tilt in radians. 0 is perpendicular, Pi/2 if flat on screen.

◆ orientation

float myscript::iink::PointerEvent::orientation = -10.f

The event orientation in radians. 0 is pointing up, -Pi/2 is left, Pi/2 is right, +/-Pi is down.

◆ pointerType

PointerType myscript::iink::PointerEvent::pointerType = PointerType::PEN

The type of input pointer.

◆ pointerId

int myscript::iink::PointerEvent::pointerId = -1

The id of the pointer.


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