| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/areaselector.h>

Public Member Functions | |
| VRS_TYPEINFO (AreaSelector, InteractionTechnique) | |
| AreaSelector (double minY, double maxY, const Color &color=Color(1.0, 0.0, 0.0, 0.3), SO< Filter > rayRequestFilter=0, RayRequestTechnique::RQMode=RayRequestTechnique::All) | |
| The AreaSelector needs minimum and maximum height values to display the selection box. | |
| void | setHeights (double minY, double maxY) |
| The displayed box can be reconfigured at arbitrary time. | |
| double | getMinHeight () const |
| double | getMaxHeight () const |
| virtual void | onDragStart (int x, int y, SO< ButtonEvent >, MouseButtonFunctionID id) |
| See navigationtechnique.h. | |
| virtual void | onDragMotion (int x, int y, SO< MotionEvent >, MouseButtonFunctionID id, int startX, int startY) |
| virtual void | onDragEnd (int x, int y, SO< ButtonEvent >, MouseButtonFunctionID id, int startX, int startY) |
| virtual void | onEventPassive (SO< Event > e, bool modeActive) |
| Running selection operations are terminated with button-release, even if the Navigation is not active anymore. | |
| SO< SceneThing > | getSelectionScene () const |
| Returns a scene containing a shape indicating the current selection. | |
| void | registerDragStartCallback (SO< Callback2< SO< ButtonEvent >, Vector > > callback) |
| Callbacks that are handled after the default processing of an event For startCallbacks, the dragStart-Pos is passed, for motion/endCallbacks the current SelectionBounds. | |
| void | registerDragMotionCallback (SO< Callback2< SO< MotionEvent >, Bounds > > callback) |
| void | registerDragEndCallback (SO< Callback2< SO< ButtonEvent >, Bounds > > callback) |
| void | unregisterDragStartCallback (SO< Callback2< SO< ButtonEvent >, Vector > > callback) |
| void | unregisterDragMotionCallback (SO< Callback2< SO< MotionEvent >, Bounds > > callback) |
| void | unregisterDragEndCallback (SO< Callback2< SO< ButtonEvent >, Bounds > > callback) |
| bool | keepSelectionSceneEnabled () const |
| Per default, the selection scene is cleared after drag-end, so that the selection box vanishes immediately. | |
| void | setKeepSelectionSceneEnabled (bool yesNo=false) |
| void | setCurrentSelection (const VRS::Bounds &bounds) |
| Sets current selection. | |
| SO< Filter > | getRayRequestFilter () const |
| void | setRayRequestFilter (SO< Filter > val) |
Static Public Attributes | |
| static const MouseButtonFunctionID | SelectionButton |
Protected Member Functions | |
| SO< SceneThing > | createSelectionScene (const Bounds &bounds) |
| Creates a scene containing a given bounding box as semi-transparent outlined box shape. | |
| void | finishSelection (SO< ButtonEvent > be) |
| clears the selection scene and calls the registered end-callbacks. | |
Protected Attributes | |
| bool | m_dragging |
| SO< Filter > | m_rayRequestFilter |
| RayRequestTechnique::RQMode | m_rayRequestMode |
| SO< SceneThing > | m_selectionScene |
| double | m_minY |
| double | m_maxY |
| Color | m_color |
| Bounds | m_selectionBounds |
| SO< Canvas > | m_canvas |
| Vector | m_dragStart |
| bool | m_keepSelectionSceneEnabled |
| SO< Array< SO< Callback2< SO < ButtonEvent >, Vector > > > > | m_startCallbacks |
| SO< Array< SO< Callback2< SO < MotionEvent >, Bounds > > > > | m_motionCallbacks |
| SO< Array< SO< Callback2< SO < ButtonEvent >, Bounds > > > > | m_endCallbacks |
The area is displayed as a semi-transparent bounding box. The y-values of this box must be specified from outside. To handle a selection, a callback can be registered. Note: This technique assumes xz to be the 'horizontal plane'.
| VRS::AreaSelector::AreaSelector | ( | double | minY, | |
| double | maxY, | |||
| const Color & | color = Color(1.0, 0.0, 0.0, 0.3), |
|||
| SO< Filter > | rayRequestFilter = 0, |
|||
| RayRequestTechnique::RQMode | = RayRequestTechnique::All | |||
| ) |
The AreaSelector needs minimum and maximum height values to display the selection box.
| VRS::AreaSelector::VRS_TYPEINFO | ( | AreaSelector | , | |
| InteractionTechnique | ||||
| ) |
| void VRS::AreaSelector::setHeights | ( | double | minY, | |
| double | maxY | |||
| ) |
The displayed box can be reconfigured at arbitrary time.
The values are considered at the first event after the change.
| double VRS::AreaSelector::getMinHeight | ( | ) | const |
| double VRS::AreaSelector::getMaxHeight | ( | ) | const |
| virtual void VRS::AreaSelector::onDragStart | ( | int | x, | |
| int | y, | |||
| SO< ButtonEvent > | , | |||
| MouseButtonFunctionID | id | |||
| ) | [virtual] |
See navigationtechnique.h.
| virtual void VRS::AreaSelector::onDragMotion | ( | int | x, | |
| int | y, | |||
| SO< MotionEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
| virtual void VRS::AreaSelector::onDragEnd | ( | int | x, | |
| int | y, | |||
| SO< ButtonEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
Running selection operations are terminated with button-release, even if the Navigation is not active anymore.
Reimplemented from VRS::InteractionTechnique.
| SO<SceneThing> VRS::AreaSelector::getSelectionScene | ( | ) | const |
Returns a scene containing a shape indicating the current selection.
It is only visible during dragging. The returned pointer is always equal during the lifetime of the AreaSelector.
| void VRS::AreaSelector::registerDragStartCallback | ( | SO< Callback2< SO< ButtonEvent >, Vector > > | callback | ) |
Callbacks that are handled after the default processing of an event For startCallbacks, the dragStart-Pos is passed, for motion/endCallbacks the current SelectionBounds.
| void VRS::AreaSelector::registerDragMotionCallback | ( | SO< Callback2< SO< MotionEvent >, Bounds > > | callback | ) |
| void VRS::AreaSelector::registerDragEndCallback | ( | SO< Callback2< SO< ButtonEvent >, Bounds > > | callback | ) |
| void VRS::AreaSelector::unregisterDragStartCallback | ( | SO< Callback2< SO< ButtonEvent >, Vector > > | callback | ) |
| void VRS::AreaSelector::unregisterDragMotionCallback | ( | SO< Callback2< SO< MotionEvent >, Bounds > > | callback | ) |
| void VRS::AreaSelector::unregisterDragEndCallback | ( | SO< Callback2< SO< ButtonEvent >, Bounds > > | callback | ) |
| bool VRS::AreaSelector::keepSelectionSceneEnabled | ( | ) | const |
Per default, the selection scene is cleared after drag-end, so that the selection box vanishes immediately.
If this flag is set, the box is kept visible until it is cleared externally or a new drag-interactions starts.
| void VRS::AreaSelector::setKeepSelectionSceneEnabled | ( | bool | yesNo = false |
) |
| void VRS::AreaSelector::setCurrentSelection | ( | const VRS::Bounds & | bounds | ) |
Sets current selection.
| SO<SceneThing> VRS::AreaSelector::createSelectionScene | ( | const Bounds & | bounds | ) | [protected] |
Creates a scene containing a given bounding box as semi-transparent outlined box shape.
| void VRS::AreaSelector::finishSelection | ( | SO< ButtonEvent > | be | ) | [protected] |
clears the selection scene and calls the registered end-callbacks.
be is passed to the callbacks.
const MouseButtonFunctionID VRS::AreaSelector::SelectionButton [static] |
bool VRS::AreaSelector::m_dragging [protected] |
SO<Filter> VRS::AreaSelector::m_rayRequestFilter [protected] |
SO<SceneThing> VRS::AreaSelector::m_selectionScene [protected] |
double VRS::AreaSelector::m_minY [protected] |
double VRS::AreaSelector::m_maxY [protected] |
Color VRS::AreaSelector::m_color [protected] |
Bounds VRS::AreaSelector::m_selectionBounds [protected] |
SO<Canvas> VRS::AreaSelector::m_canvas [protected] |
Vector VRS::AreaSelector::m_dragStart [protected] |
bool VRS::AreaSelector::m_keepSelectionSceneEnabled [protected] |
SO<Array<SO<Callback2<SO<ButtonEvent>, Vector> > > > VRS::AreaSelector::m_startCallbacks [protected] |
SO<Array<SO<Callback2<SO<MotionEvent>, Bounds> > > > VRS::AreaSelector::m_motionCallbacks [protected] |
SO<Array<SO<Callback2<SO<ButtonEvent>, Bounds> > > > VRS::AreaSelector::m_endCallbacks [protected] |