Inviwo
0.9.10.1
Inviwo documentation
|
Touch event contains all touch points associated with the event. Touch events are usually generated by touch screens or touch pads, see TouchDevice. More...
#include <touchevent.h>
Public Member Functions | |
TouchEvent (const std::vector< TouchPoint > &touchPoints, const TouchDevice *source) | |
virtual TouchEvent * | clone () const override |
bool | hasTouchPoints () const |
const std::vector< TouchPoint > & | touchPoints () const |
std::vector< TouchPoint > & | touchPoints () |
void | setTouchPoints (std::vector< TouchPoint > val) |
uvec2 | canvasSize () const |
dvec2 | centerPoint () const |
Computes average position. Returns dvec2(0) if no touch points exist. More... | |
dvec2 | centerPointNormalized () const |
Computes average normalized position. Returns dvec2(0) if no touch points exist. More... | |
dvec2 | prevCenterPointNormalized () const |
Computes previous average normalized position. Returns dvec2(0) if no touch points exist. More... | |
dvec3 | centerNDC () const |
Average of touch points in normalized device coordinates, TouchPoint::ndc() Defined in (-1,1) in a left handed coordinate system. More... | |
double | averageDepth () const |
Average depth of touch points, TouchPoint::depth() Defined in [-1 1], where -1 is the near plane and 1 is the far plane. More... | |
const TouchDevice * | getDevice () const |
Return TouchDevice that generated the event. | |
std::vector< const TouchPoint * > | findClosestTwoTouchPoints () const |
Retrieve pointers to the two closest touch points. More... | |
virtual uint64_t | hash () const override |
virtual void | print (std::ostream &ss) const override |
Public Member Functions inherited from inviwo::InteractionEvent | |
InteractionEvent (KeyModifiers modifiers=KeyModifiers(flags::empty)) | |
InteractionEvent (const InteractionEvent &rhs)=default | |
InteractionEvent & | operator= (const InteractionEvent &that)=default |
KeyModifiers | modifiers () const |
void | setModifiers (KeyModifiers modifiers) |
std::string | modifierNames () const |
void | setToolTip (const std::string &tooltip) const |
void | setToolTipCallback (ToolTipCallback callback) |
const ToolTipCallback & | getToolTipCallback () const |
Public Member Functions inherited from inviwo::Event | |
virtual bool | shouldPropagateTo (Inport *inport, Processor *processor, Outport *source) |
void | markAsUsed () |
bool | hasBeenUsed () const |
void | markAsUnused () |
void | markAsVisited (Processor *) |
void | markAsVisited (Event &) |
bool | hasVisitedProcessor (Processor *) const |
const std::vector< Processor * > & | getVisitedProcessors () const |
template<typename EventType > | |
EventType * | getAs () |
template<typename EventType > | |
const EventType * | getAs () const |
Static Public Member Functions | |
static PickingState | getPickingState (const std::vector< TouchPoint > &points) |
Get PickingState by analyzing all touch points. More... | |
static constexpr uint64_t | chash () |
Additional Inherited Members | |
Public Types inherited from inviwo::InteractionEvent | |
using | ToolTipCallback = std::function< void(const std::string &)> |
Protected Member Functions inherited from inviwo::Event | |
Event (const Event &rhs)=default | |
Event & | operator= (const Event &that)=default |
Protected Attributes inherited from inviwo::InteractionEvent | |
KeyModifiers | modifiers_ |
ToolTipCallback | tooltip_ |
Touch event contains all touch points associated with the event. Touch events are usually generated by touch screens or touch pads, see TouchDevice.
double inviwo::TouchEvent::averageDepth | ( | ) | const |
Average depth of touch points, TouchPoint::depth() Defined in [-1 1], where -1 is the near plane and 1 is the far plane.
dvec3 inviwo::TouchEvent::centerNDC | ( | ) | const |
Average of touch points in normalized device coordinates, TouchPoint::ndc() Defined in (-1,1) in a left handed coordinate system.
dvec2 inviwo::TouchEvent::centerPoint | ( | ) | const |
Computes average position. Returns dvec2(0) if no touch points exist.
dvec2 inviwo::TouchEvent::centerPointNormalized | ( | ) | const |
Computes average normalized position. Returns dvec2(0) if no touch points exist.
std::vector< const TouchPoint * > inviwo::TouchEvent::findClosestTwoTouchPoints | ( | ) | const |
Retrieve pointers to the two closest touch points.
|
static |
Get PickingState by analyzing all touch points.
dvec2 inviwo::TouchEvent::prevCenterPointNormalized | ( | ) | const |
Computes previous average normalized position. Returns dvec2(0) if no touch points exist.