Class: TouchEventDetails

olympe.ui.events. TouchEventDetails

This class provides individual details for multi-touch event. A TouchEvent can support multiple touch points (e.g. multiple fingers), these are recorded as a TouchEventDetails instance.


new TouchEventDetails(relativePos, absolutePos, radius, rotationAngle, force, identifier)

Creates an instance of a TouchEventDetails.

Parameters:
Name Type Description
relativePos olympe.df.Vector2
absolutePos olympe.df.Vector2
radius olympe.df.Vector2
rotationAngle olympe.df.ONumber
force olympe.df.ONumber
identifier string

Methods


getAbsolutePos()

Gets the absolute starting position of the touch event.

Returns:

Absolute touch position

Type
olympe.df.PVector2

getForce()

Returns the amount of pressure the user is applying to the touch surface for a Touch point.

Warning: This method is experimental and may not work on all touch devices

Returns:

Amount of pressure the user is applying to the touch surface for a Touch point

Type
olympe.df.PONumber

getIdentifier()

Gets the unique identifier for this touch.

Returns:

Identifier of this touch

Type
string

getRadius()

Returns the radius, in pixels, of the ellipse that most closely circumscribes the area of contact with the touch surface.

Warning: This method is experimental and may not work on all touch devices

Returns:

Radius in pixels

Type
olympe.df.PVector2

getRelativePos()

Gets the starting position of the touch event relative to the coordinates of its Element.

Returns:

touch position relative to targeted element

Type
olympe.df.PVector2

getRotationAngle()

Returns the rotation angle, in degrees, of the contact area ellipse defined by radius. The value may be between 0 and 90.

Warning: This method is experimental and may not work on all touch devices

Returns:

Rotation angle, in degrees

Type
olympe.df.PONumber