Dgame.System.Touch

« Go back

Bottom


abstract class Touch;
Represent Touch-Events

Author:
Randy Schuett (rswhite4@googlemail.com)

struct Finger;
The Finger structure

long id;
The Finger ID

float x;
The x coordinate in range of 0 .. 1 Multiply it with the width of the Window to get the real x coordinate

float y;
The y coordinate in range of 0 .. 1 Multiply it with the height of the Window to get the real y coordinate

float pressure;
The quantity of pressure applied in range of 0 .. 1

static nothrow @nogc int getNumOfDevices();
Returns of many Touch-Devices exist

static nothrow @nogc long getDevice(int index);
Returns the Touch-ID of the Touch-Device with the given index

static nothrow @nogc int getNumOfFingers(long touchId);
Returns the amount of (supported) fingers for the Touch-Device with the given ID

static nothrow @nogc Finger getFinger(long touchId, int index);
Returns the Finger with the given index of the Touch.Device with the given ID


Page generated by Ddoc.

» Dgame.System.Touch on Github

Top

« Go back