#include <touchevent.h>
|
| TouchPoint (int id, TouchState touchState, dvec2 posNormalized, dvec2 prevPosNormalized, dvec2 pressedPosNormalized, uvec2 canvasSize, double pressure, double depth=1.0) |
|
bool | operator== (const TouchPoint &b) const |
|
bool | operator!= (const TouchPoint &b) const |
|
TouchState | state () const |
|
int | id () const |
| Retrieve touch point id. More...
|
|
void | setId (int id) |
|
dvec2 | pos () const |
| Retrieve position in screen coordinates [0 dim-1]^2.
|
|
void | setPos (dvec2 val) |
|
dvec2 | posNormalized () const |
| Retrieve position normalized to the size of the screen [0 1]^2.
|
|
void | setPosNormalized (dvec2 val) |
|
dvec2 | prevPos () const |
| Retrieve the previous event position in screen coordinates [0 dim-1]^2.
|
|
void | setPrevPos (dvec2 val) |
|
dvec2 | prevPosNormalized () const |
| Retrieve the previous position normalized to the size of the screen [0 1]^2.
|
|
void | setPrevPosNormalized (dvec2 val) |
|
dvec2 | pressedPos () const |
| Retrieve the pressed event position in screen coordinates [0 dim-1]^2.
|
|
void | setPressedPos (dvec2 val) |
|
dvec2 | pressedPosNormalized () const |
| Retrieve the pressed position normalized to the size of the screen [0 1]^2.
|
|
void | setPressedPosNormalized (dvec2 val) |
|
double | depth () const |
|
void | setDepth (double val) |
|
double | pressure () const |
|
void | setPressure (double val) |
|
uvec2 | canvasSize () const |
|
void | setCanvasSize (uvec2 size) |
|
dvec3 | ndc () const |
|
|
int | id_ |
|
TouchState | state_ |
|
dvec2 | posNormalized_ |
|
dvec2 | prevPosNormalized_ |
|
dvec2 | pressedPosNormalized_ |
|
double | pressure_ |
|
uvec2 | canvasSize_ |
|
double | depth_ |
|
Point at which a finger touches a screen or touch pad. Several touch points are contained within a TouchEvent
- See also
- TouchEvent
◆ TouchPoint()
inviwo::TouchPoint::TouchPoint |
( |
int |
id, |
|
|
TouchState |
touchState, |
|
|
dvec2 |
posNormalized, |
|
|
dvec2 |
prevPosNormalized, |
|
|
dvec2 |
pressedPosNormalized, |
|
|
uvec2 |
canvasSize, |
|
|
double |
pressure, |
|
|
double |
depth = 1.0 |
|
) |
| |
- Parameters
-
id | Touch point id that distinguishes a particular touch point |
touchState | State of the touch point. |
posNormalized | Position normalized to the size of the screen [0 1]^2. |
prevPosNormalized | Previous position normalized to the size of the screen [0 1]^2. |
pressedPosNormalized | Position that was pressed normalized to the size of the screen [0 * 1]^2. |
canvasSize | size of the canvas from where the event originates |
pressure | the pressure of the touch |
depth | Depth value in normalized device coordinates ([-1 1]) at touch point, 1 if no depth is available. |
◆ depth()
double inviwo::TouchPoint::depth |
( |
| ) |
const |
Retrieve depth value in normalized device coordinates at touch point. Defined in [-1 1], where -1 is the near plane and 1 is the far plane. Will be 1 if no depth value is available.
◆ id()
int inviwo::TouchPoint::id |
( |
| ) |
const |
Retrieve touch point id.
- Returns
- int
◆ ndc()
dvec3 inviwo::TouchPoint::ndc |
( |
| ) |
const |
Returns the normalized device coordinates. Position and depth normalized to the range of (-1,1) in a left handed coordinate system. The lower left near will be (-1,-1,-1) And the upper right far (1,1,1)
◆ operator!=()
bool inviwo::TouchPoint::operator!= |
( |
const TouchPoint & |
b | ) |
const |
Return true if any positions or state is eifferent, false otherwise.
◆ operator==()
bool inviwo::TouchPoint::operator== |
( |
const TouchPoint & |
b | ) |
const |
Return true if all positions and state are the same, false otherwise.
◆ pressure()
double inviwo::TouchPoint::pressure |
( |
| ) |
const |
Return how hard the touch point is being pressed.
The documentation for this class was generated from the following files:
- touchevent.h
- touchevent.cpp