![]() |
OpenWalnut
1.5.0dev
|
Handles picking events. More...
Collaboration diagram for WMNavigationSlices::PickCallback:Public Types | |
| typedef std::shared_ptr< PickCallback > | SPtr |
| For the lazy guys. More... | |
Public Member Functions | |
| PickCallback (osg::ref_ptr< osg::Node > node, WPropDouble property, bool negateDirection=false) | |
| The callback, controlling. More... | |
Private Member Functions | |
| void | pick (WPickInfo pickInfo) |
| Pick event handler. More... | |
Private Attributes | |
| boost::signals2::scoped_connection | m_pickConnection |
| The pick connection for the pick() event handler. More... | |
| osg::ref_ptr< osg::Node > | m_node |
| The slice node. More... | |
| WPropDouble | m_property |
| The property controlling the position of the slice. More... | |
| osg::ref_ptr< WGECamera > | m_camera |
| The camera under which the node is placed. More... | |
| bool | m_isPicked |
| If true, the item is still picked. More... | |
| osg::ref_ptr< osg::Uniform > | m_pickUniform |
| This uniform is used to inform the shader about current pick-state. More... | |
| WVector2d | m_oldPixelPosition |
| The stored pixel position of a previous drag event. More... | |
| float | m_dir |
| The transformation direction. More... | |
Handles picking events.
Definition at line 112 of file WMNavigationSlices.h.
| typedef std::shared_ptr< PickCallback > WMNavigationSlices::PickCallback::SPtr |
For the lazy guys.
Definition at line 118 of file WMNavigationSlices.h.
| WMNavigationSlices::PickCallback::PickCallback | ( | osg::ref_ptr< osg::Node > | node, |
| WPropDouble | property, | ||
| bool | negateDirection = false |
||
| ) |
The callback, controlling.
| property | the property controlling the position of the slice |
| node | the node getting controlled by this instance. |
| negateDirection | if true, the translation direction is switched. |
Definition at line 301 of file WMNavigationSlices.cpp.
References WGraphicsEngine::getGraphicsEngine(), m_camera, m_pickConnection, m_pickUniform, and pick().
Here is the call graph for this function:
|
private |
Pick event handler.
Uses for dragging the slices
| pickInfo | the pick information. |
Definition at line 316 of file WMNavigationSlices.cpp.
References WPickInfo::getName(), WPickInfo::getPickNormal(), WPickInfo::getPickPixel(), and wge::unprojectFromScreen().
Referenced by PickCallback().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
The camera under which the node is placed.
Needed for proper back-projection.
Definition at line 155 of file WMNavigationSlices.h.
Referenced by PickCallback().
|
private |
The transformation direction.
This is needed since the OSG coord system has a mirrored coronal direction.
Definition at line 175 of file WMNavigationSlices.h.
|
private |
If true, the item is still picked.
Definition at line 160 of file WMNavigationSlices.h.
|
private |
|
private |
The stored pixel position of a previous drag event.
Definition at line 170 of file WMNavigationSlices.h.
|
private |
The pick connection for the pick() event handler.
Definition at line 140 of file WMNavigationSlices.h.
Referenced by PickCallback().
|
private |
This uniform is used to inform the shader about current pick-state.
Definition at line 165 of file WMNavigationSlices.h.
Referenced by PickCallback().
|
private |
The property controlling the position of the slice.
Definition at line 150 of file WMNavigationSlices.h.