|
| MouseInteractionEvent (MouseButtons buttonState=MouseButtons(flags::empty), KeyModifiers modifiers=KeyModifiers(flags::empty), dvec2 normalizedPosition=dvec2(0), uvec2 canvasSize=uvec2(1), double depth=1.0) |
|
| MouseInteractionEvent (const MouseInteractionEvent &rhs)=default |
|
MouseInteractionEvent & | operator= (const MouseInteractionEvent &that)=default |
|
virtual MouseInteractionEvent * | clone () const override=0 |
|
MouseButtons | buttonState () const |
|
void | setButtonState (MouseButtons buttonState) |
|
dvec2 | pos () const |
|
void | setPos (dvec2 pos) |
|
uvec2 | canvasSize () const |
|
void | setCanvasSize (uvec2 size) |
|
double | depth () const |
|
void | setDepth (double depth) |
|
dvec2 | posNormalized () const |
|
void | setPosNormalized (dvec2 pos) |
|
dvec3 | ndc () const |
|
double | x () const |
|
double | y () const |
|
std::string | buttonName () const |
|
| 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 |
|
virtual uint64_t | hash () const =0 |
|
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 |
|
virtual void | print (std::ostream &ss) const |
|
|
using | ToolTipCallback = std::function< void(const std::string &)> |
|
| Event (const Event &rhs)=default |
|
Event & | operator= (const Event &that)=default |
|
KeyModifiers | modifiers_ |
|
ToolTipCallback | tooltip_ |
|
◆ buttonState()
MouseButtons inviwo::MouseInteractionEvent::buttonState |
( |
| ) |
const |
Get all the pressed buttons.
◆ canvasSize()
uvec2 inviwo::MouseInteractionEvent::canvasSize |
( |
| ) |
const |
The size of the canvas where the event occurred.
◆ depth()
double inviwo::MouseInteractionEvent::depth |
( |
| ) |
const |
Retrieve depth value in normalized device coordinates at mouse position. 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. The depth is then defined to be positive inwards by default, resulting in a left handed coordinate system together with the position.
◆ ndc()
dvec3 inviwo::MouseInteractionEvent::ndc |
( |
| ) |
const |
Returns the normalized device coordinates. Position and depth normalized to the range of (-1,1) In in a left handed coordinate system. The lower left near will be (-1,-1,-1) And the upper right far (1,1,1)
◆ pos()
dvec2 inviwo::MouseInteractionEvent::pos |
( |
| ) |
const |
Position of the mouse in the canvas. The lower left corner is (0,0) the upper right corner is (canvasSize.x, canvasSize.y) This is in accordance with the positioning within an Inviwo Layer and an OpenGL texture. But opposite to QT which has (0,0) at the top left corner. The depth is then defined to be positive inwards by default, resulting in a left handed coordinate system.
◆ posNormalized()
dvec2 inviwo::MouseInteractionEvent::posNormalized |
( |
| ) |
const |
Returns the position normalized to the range (0,1). The lower left will be (0,0) And the upper right (1,1)
The documentation for this class was generated from the following files:
- mouseinteractionevent.h
- mouseinteractionevent.cpp