Inviwo  0.9.10.1
Inviwo documentation
inviwo::PickingEvent Class Reference
+ Inheritance diagram for inviwo::PickingEvent:

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 &)
 
PickingEventoperator= (const PickingEvent &)
 
virtual PickingEventclone () 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
 
uvec2 getCanvasSize () const
 
PickingState getState () const
 
PickingPressState getPressState () const
 
PickingPressItem getPressItem () const
 
PickingHoverState getHoverState () const
 
PickingPressItems getPressItems () const
 
void invoke (Processor *p)
 
const PickingActiongetPickingAction () const
 
virtual uint64_t hash () const override
 
EventgetEvent () const
 
template<typename EventType >
EventType * getEventAs () const
 
void setToolTip (const std::string &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)
 
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 constexpr uint64_t chash ()
 

Additional Inherited Members

- Protected Member Functions inherited from inviwo::Event
 Event (const Event &rhs)=default
 
Eventoperator= (const Event &that)=default
 

Member Function Documentation

◆ getCanvasSize()

uvec2 inviwo::PickingEvent::getCanvasSize ( ) const

The size of the canvas where the event occurred.

◆ getCurrentGlobalPickingId()

size_t inviwo::PickingEvent::getCurrentGlobalPickingId ( ) const

Returns the current global picking index of the object at the current position

◆ getCurrentLocalPickingId()

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.

◆ getDeltaDepth()

double inviwo::PickingEvent::getDeltaDepth ( ) const

Returns the delta of the previous and current depth;

◆ getDeltaPosition()

dvec2 inviwo::PickingEvent::getDeltaPosition ( ) const

Returns the delta of the previous and current position;

◆ getDeltaPressedDepth()

double inviwo::PickingEvent::getDeltaPressedDepth ( ) const

Returns the delta of the press depth and current depth;

◆ getDeltaPressedPosition()

dvec2 inviwo::PickingEvent::getDeltaPressedPosition ( ) const

Returns the delta of the press position and current position;

◆ getDepth()

double inviwo::PickingEvent::getDepth ( ) const

Returns the current normalized depth

◆ getGlobalPickingId()

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.

◆ getNDC()

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)

◆ getPickedId()

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.

◆ getPosition()

dvec2 inviwo::PickingEvent::getPosition ( ) const

Returns the current normalized position

◆ getPressedDepth()

double inviwo::PickingEvent::getPressedDepth ( ) const

Returns the normalized depth of the initial press

◆ getPressedGlobalPickingId()

size_t inviwo::PickingEvent::getPressedGlobalPickingId ( ) const

Returns the pressed global picking index

◆ getPressedLocalPickingId()

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.

◆ getPressedPosition()

dvec2 inviwo::PickingEvent::getPressedPosition ( ) const

Returns the normalized position of the initial press

◆ getPreviousDepth()

double inviwo::PickingEvent::getPreviousDepth ( ) const

Returns the previous normalized depth

◆ getPreviousGlobalPickingId()

size_t inviwo::PickingEvent::getPreviousGlobalPickingId ( ) const

Returns the previous global picking index

◆ getPreviousLocalPickingId()

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.

◆ getPreviousPosition()

dvec2 inviwo::PickingEvent::getPreviousPosition ( ) const

Returns the previous normalized position

◆ getWorldSpaceDeltaAtPressDepth()

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.

◆ setToolTip()

void inviwo::PickingEvent::setToolTip ( const std::string &  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.


The documentation for this class was generated from the following files: