Inviwo 0.9.12-pre
Inviwo documentation
|
Public Member Functions | |
PickingEvent (const PickingAction *pickingAction, InteractionEvent *event, PickingState state, PickingPressState pressState, PickingPressItem pressItem, PickingHoverState hoverState, PickingPressItems pressedState, size_t pickedGlobalId, size_t currentGlobalId, size_t pressedGlobalId, size_t previousGlobalId, dvec3 pressedNDC, dvec3 previousNDC) | |
PickingEvent (const PickingAction *pickingAction, std::unique_ptr< InteractionEvent > event, PickingState state, PickingPressState pressState, PickingPressItem pressItem, PickingHoverState hoverState, PickingPressItems pressedState, size_t pickedGlobalId, size_t currentGlobalId, size_t pressedGlobalId, size_t previousGlobalId, dvec3 pressedNDC, dvec3 previousNDC) | |
PickingEvent (const PickingEvent &) | |
PickingEvent & | operator= (const PickingEvent &) |
virtual PickingEvent * | clone () const override |
size_t | getPickedId () const |
size_t | getGlobalPickingId () const |
size_t | getCurrentGlobalPickingId () const |
std::pair< bool, size_t > | getCurrentLocalPickingId () const |
dvec2 | getPosition () const |
double | getDepth () const |
size_t | getPreviousGlobalPickingId () const |
std::pair< bool, size_t > | getPreviousLocalPickingId () const |
dvec2 | getPreviousPosition () const |
double | getPreviousDepth () const |
size_t | getPressedGlobalPickingId () const |
std::pair< bool, size_t > | getPressedLocalPickingId () const |
dvec2 | getPressedPosition () const |
double | getPressedDepth () const |
dvec2 | getDeltaPosition () const |
double | getDeltaDepth () const |
dvec2 | getDeltaPressedPosition () const |
double | getDeltaPressedDepth () const |
dvec3 | getNDC () const |
dvec3 | getPreviousNDC () const |
dvec3 | getPressedNDC () const |
dvec3 | getWorldSpaceDeltaAtPressDepth (const Camera &camera) const |
bool | getMovedSincePressed (double deltaDistance=3.0) const |
uvec2 | getCanvasSize () const |
PickingState | getState () const |
PickingPressState | getPressState () const |
PickingPressItem | getPressItem () const |
PickingHoverState | getHoverState () const |
PickingPressItems | getPressItems () const |
KeyModifiers | modifiers () const |
void | invoke (Processor *p) |
const PickingAction * | getPickingAction () const |
virtual uint64_t | hash () const override |
InteractionEvent * | getEvent () const |
template<typename EventType > | |
EventType * | getEventAs () const |
void | setToolTip (std::string_view tooltip) const |
const InteractionEvent::ToolTipCallback & | getToolTipCallback () const |
virtual void | print (std::ostream &ss) const override |
Public Member Functions inherited from inviwo::Event | |
virtual bool | shouldPropagateTo (Inport *inport, Processor *processor, Outport *source) |
bool | markAsUsed () |
bool | hasBeenUsed () const |
bool | markAsUnused () |
bool | setUsed (bool isUsed) |
bool | 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 constexpr uint64_t | chash () |
Additional Inherited Members | |
Protected Member Functions inherited from inviwo::Event | |
Event (const Event &rhs)=default | |
Event & | operator= (const Event &that)=default |
|
overridevirtual |
Implements inviwo::Event.
uvec2 inviwo::PickingEvent::getCanvasSize | ( | ) | const |
The size of the canvas where the event occurred.
size_t inviwo::PickingEvent::getCurrentGlobalPickingId | ( | ) | const |
Returns the current global picking index of the object at the current position
std::pair< bool, size_t > inviwo::PickingEvent::getCurrentLocalPickingId | ( | ) | const |
Returns the current local picking index If the global index belongs to a different picking action {false, 0} is returned.
double inviwo::PickingEvent::getDeltaDepth | ( | ) | const |
Returns the delta of the previous and current depth;
dvec2 inviwo::PickingEvent::getDeltaPosition | ( | ) | const |
Returns the delta of the previous and current position;
double inviwo::PickingEvent::getDeltaPressedDepth | ( | ) | const |
Returns the delta of the press depth and current depth;
dvec2 inviwo::PickingEvent::getDeltaPressedPosition | ( | ) | const |
Returns the delta of the press position and current position;
double inviwo::PickingEvent::getDepth | ( | ) | const |
Returns the current normalized depth
size_t inviwo::PickingEvent::getGlobalPickingId | ( | ) | const |
Returns the global picking index of the object currently being picked. this id does not change while an item is being pressed even if the position is no longer on the item.
bool inviwo::PickingEvent::getMovedSincePressed | ( | double | deltaDistance = 3.0 | ) | const |
Returns true if the distance between the pressed position and current position in screen coordinates is larger than deltaDistance
or the current picking ID is different to the pressed one.
dvec3 inviwo::PickingEvent::getNDC | ( | ) | 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)
size_t inviwo::PickingEvent::getPickedId | ( | ) | const |
Returns the local picking index of the object currently being picked. this id does not change while an item is being pressed even if the position is no longer on the item.
dvec2 inviwo::PickingEvent::getPosition | ( | ) | const |
Returns the current normalized position
double inviwo::PickingEvent::getPressedDepth | ( | ) | const |
Returns the normalized depth of the initial press
size_t inviwo::PickingEvent::getPressedGlobalPickingId | ( | ) | const |
Returns the pressed global picking index
std::pair< bool, size_t > inviwo::PickingEvent::getPressedLocalPickingId | ( | ) | const |
Returns the pressed local picking index If the global index belongs to a different picking action {false, 0} is returned.
dvec2 inviwo::PickingEvent::getPressedPosition | ( | ) | const |
Returns the normalized position of the initial press
double inviwo::PickingEvent::getPreviousDepth | ( | ) | const |
Returns the previous normalized depth
size_t inviwo::PickingEvent::getPreviousGlobalPickingId | ( | ) | const |
Returns the previous global picking index
std::pair< bool, size_t > inviwo::PickingEvent::getPreviousLocalPickingId | ( | ) | const |
Returns the previous local picking index If the global index belongs to a different picking action {false, 0} is returned.
dvec2 inviwo::PickingEvent::getPreviousPosition | ( | ) | const |
Returns the previous normalized position
dvec3 inviwo::PickingEvent::getWorldSpaceDeltaAtPressDepth | ( | const Camera & | camera | ) | const |
Return the {curr.x, curr.y. press.z} - {prev.x, prev.y, press.z} transformed into world space using the given camera. This is useful when dragging an object in the screen plane.
|
overridevirtual |
Implements inviwo::Event.
|
overridevirtual |
Reimplemented from inviwo::Event.
void inviwo::PickingEvent::setToolTip | ( | std::string_view | tooltip | ) | const |
Display a tool tip using the optionally set tool tip callback. If no tool tip callback is set, the function does nothing. The supported formation depends on the used back end, but simple html is usually supported. Calling the function with an empty sting will hide any existing tool tip.