![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
cvRenderViewSelectionReaction handles all selection modes in a single class More...
#include <cvRenderViewSelectionReaction.h>


Public Types | |
| using | SelectionMode = ::SelectionMode |
| using | SelectionModifier = ::SelectionModifier |
Public Slots | |
| virtual void | actionTriggered (bool val) |
| Called when the action is triggered. More... | |
| virtual void | updateEnableState () |
| Updates the enabled state of the action. More... | |
Signals | |
| void | selectionFinished (const cvSelectionData &selectionData) |
| Emitted when selection is finished. More... | |
| void | selectedCustomBox (int xmin, int ymin, int xmax, int ymax) |
| Emitted for custom box selection. More... | |
| void | selectedCustomBox (const int region[4]) |
| void | selectedCustomPolygon (vtkIntArray *polygon) |
| Emitted for custom polygon selection. More... | |
| void | zoomToBoxCompleted (int xmin, int ymin, int xmax, int ymax) |
| Emitted when zoom to box is completed. More... | |
Public Member Functions | |
| cvRenderViewSelectionReaction (QAction *parentAction, SelectionMode mode, QActionGroup *modifierGroup=nullptr) | |
| Constructor. More... | |
| ~cvRenderViewSelectionReaction () override | |
| QAction * | parentAction () const |
| Get the parent action. More... | |
| SelectionMode | mode () const |
| Get the selection mode. More... | |
| void | setVisualizer (ecvGenericVisualizer3D *viewer) |
| Set the visualizer for selection operations. More... | |
| ecvGenericVisualizer3D * | getVisualizer () const |
| Get the current visualizer. More... | |
| bool | isActive () const |
| Check if this reaction's selection is currently active. More... | |
| void | handleSelectionChanged (vtkObject *caller, unsigned long eventId, void *callData) |
| Handle selection changed event from VTK (public for callback access) More... | |
| Q_INVOKABLE void | handleMouseMove () |
| Handle mouse move event (public for callback access) More... | |
| Q_INVOKABLE void | handleLeftButtonPress () |
| Handle left button press (public for callback access) More... | |
| Q_INVOKABLE void | handleLeftButtonRelease () |
| Handle left button release (public for callback access) More... | |
| Q_INVOKABLE void | handleWheelRotate () |
| Handle wheel rotation (public for callback access) More... | |
| Q_INVOKABLE void | handleRightButtonPressed () |
| Handle right button press (public for callback access) More... | |
| Q_INVOKABLE void | handleRightButtonRelease () |
| Handle right button release (public for callback access) More... | |
Static Public Member Functions | |
| static cvRenderViewSelectionReaction * | activeReaction () |
| Get the currently active reaction (static) More... | |
| static void | endActiveSelection () |
| Force end any active selection. More... | |
Protected Slots | |
| virtual void | beginSelection () |
| Starts the selection mode. More... | |
| virtual void | endSelection () |
| Ends the selection mode. More... | |
| virtual void | onMouseStop () |
| Handle mouse stop event (for tooltip display) More... | |
| virtual void | clearSelectionCache () |
| Clear selection cache when data changes. More... | |
Protected Member Functions | |
| virtual void | selectionChanged (vtkObject *caller, unsigned long eventId, void *callData) |
| Callback for selection changed event from VTK. More... | |
| virtual void | onMouseMove () |
| Handle mouse move events (for interactive selection) More... | |
| virtual void | onLeftButtonPress () |
| Handle left button press (for zoom tracking) More... | |
| virtual void | onLeftButtonRelease () |
| Handle left button release (for interactive selection) More... | |
| virtual void | onWheelRotate () |
| Handle wheel rotation events. More... | |
| virtual void | onRightButtonPressed () |
| Handle right button press (disable pre-selection) More... | |
| virtual void | onRightButtonRelease () |
| Handle right button release (re-enable pre-selection) More... | |
| virtual void | onMiddleButtonPressed () |
| Handle middle button press (disable pre-selection during pan) More... | |
| virtual void | onMiddleButtonRelease () |
| Handle middle button release (re-enable pre-selection, invalidate cache) More... | |
| virtual void | preSelection () |
| Perform pre-selection highlighting. More... | |
| virtual void | fastPreSelection () |
| Perform fast pre-selection using cached buffers. More... | |
| virtual void | updateTooltip () |
| Update tooltip display. More... | |
| virtual int | getSelectionModifier () |
| Get the selection modifier from keyboard state. More... | |
| virtual bool | isCompatible (SelectionMode mode) |
| Check if this selection is compatible with another mode. More... | |
| virtual void | cleanupObservers () |
| Clean up event observers. More... | |
| void | uncheckSelectionModifiers () |
| Uncheck selection modifier buttons. More... | |
| void | selectCellsOnSurface (int region[4], int selectionModifier) |
| Select cells on surface. More... | |
| void | selectPointsOnSurface (int region[4], int selectionModifier) |
| Select points on surface. More... | |
| void | selectFrustumCells (int region[4], int selectionModifier) |
| Select cells in frustum. More... | |
| void | selectFrustumPoints (int region[4], int selectionModifier) |
| Select points in frustum. More... | |
| void | finalizeSelection (const cvSelectionData &newSelection, int selectionModifier, const QString &description) |
| Unified selection finalization (ParaView-style) Combines new selection with existing, updates manager, and shows highlights. More... | |
| void | selectPolygonCells (vtkIntArray *polygon, int selectionModifier) |
| Select cells in polygon. More... | |
| void | selectPolygonPoints (vtkIntArray *polygon, int selectionModifier) |
| Select points in polygon. More... | |
| void | selectBlock (int region[4], int selectionModifier) |
| Select blocks. More... | |
| PclUtils::PCLVis * | getPCLVis () const |
| Get the PCLVis instance. More... | |
| cvSelectionPipeline * | getSelectionPipeline () const |
| Get the selection pipeline. More... | |
| cvSelectionHighlighter * | getSelectionHighlighter () const |
| Get the selection highlighter. More... | |
| bool | isSelectingCells () const |
| Check if currently selecting cells (vs points) More... | |
| bool | isInteractiveMode () const |
| Check if this is an interactive selection mode. More... | |
| bool | isTooltipMode () const |
| Check if this is a tooltip mode. More... | |
| void | setCursor (const QCursor &cursor) |
| Set cursor on the view. More... | |
| void | unsetCursor () |
| Restore default cursor. More... | |
| void | storeCurrentStyle () |
| Store current interactor style. More... | |
| void | restoreStyle () |
| Restore previous interactor style. More... | |
| void | setupInteractorStyle () |
| Set up interactor style for this selection mode. More... | |
| void | setupObservers () |
| Set up event observers for this selection mode. More... | |
| void | addCameraMovementObservers (int startIndex) |
| Add camera movement observers for cache invalidation. More... | |
| void | setRubberBand3DStyle (bool renderOnMouseMove) |
| Set vtkInteractorStyleRubberBand3D as the interactor style. More... | |
| void | showInstructionDialog () |
| Show instruction dialog for interactive modes. More... | |
| void | vtkOnSelectionChanged (vtkObject *caller, unsigned long eventId, void *callData) |
| VTK callback functions for observer pattern. More... | |
| void | vtkOnMouseMove (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnLeftButtonPress (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnLeftButtonRelease (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnWheelRotate (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnRightButtonPressed (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnRightButtonRelease (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnMiddleButtonPressed (vtkObject *caller, unsigned long eventId, void *callData) |
| void | vtkOnMiddleButtonRelease (vtkObject *caller, unsigned long eventId, void *callData) |
cvRenderViewSelectionReaction handles all selection modes in a single class
This class follows ParaView's pqRenderViewSelectionReaction pattern:
Key improvements over the previous multi-layer architecture:
Reference: pqRenderViewSelectionReaction.{h,cxx}
Definition at line 89 of file cvRenderViewSelectionReaction.h.
Definition at line 93 of file cvRenderViewSelectionReaction.h.
Definition at line 94 of file cvRenderViewSelectionReaction.h.
| cvRenderViewSelectionReaction::cvRenderViewSelectionReaction | ( | QAction * | parentAction, |
| SelectionMode | mode, | ||
| QActionGroup * | modifierGroup = nullptr |
||
| ) |
Constructor.
| parentAction | The QAction that triggers this reaction |
| mode | The selection mode for this reaction |
| modifierGroup | Optional action group for selection modifiers |
Definition at line 86 of file cvRenderViewSelectionReaction.cpp.
References actionTriggered(), CLEAR_SELECTION, GROW_SELECTION, HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, cvViewSelectionManager::instance(), onMouseStop(), parentAction(), SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, cvViewSelectionManager::selectionChanged(), SHRINK_SELECTION, and updateEnableState().
|
override |
Definition at line 177 of file cvRenderViewSelectionReaction.cpp.
References cleanupObservers().
|
virtualslot |
Called when the action is triggered.
For checkable actions, calls beginSelection() or endSelection(). For non-checkable actions, calls both in sequence.
Reference: pqRenderViewSelectionReaction::actionTriggered()
Definition at line 324 of file cvRenderViewSelectionReaction.cpp.
References beginSelection(), and endSelection().
Referenced by cvRenderViewSelectionReaction().
|
inlinestatic |
Get the currently active reaction (static)
Reference: pqRenderViewSelectionReaction::ActiveReaction
Definition at line 142 of file cvRenderViewSelectionReaction.h.
Referenced by cvSelectionToolController::isAnyToolActive().
|
protected |
Add camera movement observers for cache invalidation.
| startIndex | Starting index in m_observerIds array |
Adds observers for: WheelForward, WheelBackward, RightButtonPress, RightButtonRelease, MiddleButtonPress, MiddleButtonRelease
Definition at line 1951 of file cvRenderViewSelectionReaction.cpp.
References vtkOnMiddleButtonPressed(), vtkOnMiddleButtonRelease(), vtkOnRightButtonPressed(), vtkOnRightButtonRelease(), and vtkOnWheelRotate().
Referenced by setupObservers().
|
protectedvirtualslot |
Starts the selection mode.
This will:
Reference: pqRenderViewSelectionReaction::beginSelection()
Definition at line 404 of file cvRenderViewSelectionReaction.cpp.
References CLEAR_SELECTION, cvViewSelectionManager::clearSelection(), getPCLVis(), getSelectionPipeline(), GROW_SELECTION, cvViewSelectionManager::growSelection(), HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, cvViewSelectionManager::instance(), SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, setupInteractorStyle(), setupObservers(), showInstructionDialog(), SHRINK_SELECTION, cvViewSelectionManager::shrinkSelection(), uncheckSelectionModifiers(), and CVLog::Warning().
Referenced by actionTriggered().
|
protectedvirtual |
Clean up event observers.
Reference: pqRenderViewSelectionReaction::cleanupObservers()
Definition at line 1438 of file cvRenderViewSelectionReaction.cpp.
Referenced by endSelection(), and ~cvRenderViewSelectionReaction().
|
protectedvirtualslot |
Clear selection cache when data changes.
Reference: pqRenderViewSelectionReaction::clearSelectionCache()
Definition at line 623 of file cvRenderViewSelectionReaction.cpp.
References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().
|
static |
Force end any active selection.
Utility method to ensure clean state when switching views or performing operations that require no active selection.
Definition at line 226 of file cvRenderViewSelectionReaction.cpp.
Referenced by cvSelectionToolController::disableAllTools().
|
protectedvirtualslot |
Ends the selection mode.
This will:
Reference: pqRenderViewSelectionReaction::endSelection()
Definition at line 518 of file cvRenderViewSelectionReaction.cpp.
References cleanupObservers(), cvSelectionPipeline::exitSelectionMode(), getPCLVis(), getSelectionPipeline(), PclUtils::PCLVis::isPointPickingEnabled(), CVLog::PrintVerbose(), restoreStyle(), PclUtils::PCLVis::setPointPickingEnabled(), unsetCursor(), and updateTooltip().
Referenced by actionTriggered(), onLeftButtonRelease(), selectionChanged(), setVisualizer(), and updateEnableState().
|
protectedvirtual |
Perform fast pre-selection using cached buffers.
Reference: pqRenderViewSelectionReaction::fastPreSelection()
Definition at line 1048 of file cvRenderViewSelectionReaction.cpp.
References preSelection().
|
protected |
Unified selection finalization (ParaView-style) Combines new selection with existing, updates manager, and shows highlights.
| newSelection | The newly selected elements |
| selectionModifier | How to combine with existing selection |
| description | Debug description for logging |
Definition at line 1556 of file cvRenderViewSelectionReaction.cpp.
References cvSelectionHighlighter::clearHighlights(), cvSelectionPipeline::combineSelections(), cvViewSelectionManager::currentSelection(), PclUtils::PCLVis::getIdByActor(), getPCLVis(), getSelectionHighlighter(), PclUtils::PCLVis::getSourceObject(), cvSelectionData::hasActorInfo(), cvSelectionHighlighter::highlightSelection(), cvViewSelectionManager::instance(), cvSelectionData::isEmpty(), cvSelectionData::primaryActor(), cvSelectionHighlighter::SELECTED, selectionFinished(), cvViewSelectionManager::setCurrentSelection(), cvViewSelectionManager::setSourceObject(), and CVLog::Warning().
Referenced by selectCellsOnSurface(), selectPointsOnSurface(), selectPolygonCells(), and selectPolygonPoints().
|
protected |
Get the PCLVis instance.
Definition at line 1676 of file cvRenderViewSelectionReaction.cpp.
Referenced by beginSelection(), endSelection(), finalizeSelection(), restoreStyle(), and setVisualizer().
|
protected |
Get the selection highlighter.
Definition at line 1691 of file cvRenderViewSelectionReaction.cpp.
References cvViewSelectionManager::getHighlighter(), and cvViewSelectionManager::instance().
Referenced by finalizeSelection(), preSelection(), selectCellsOnSurface(), selectPointsOnSurface(), selectPolygonCells(), and selectPolygonPoints().
|
protectedvirtual |
Get the selection modifier from keyboard state.
Checks Ctrl, Shift keys and modifier group to determine modifier.
Reference: pqRenderViewSelectionReaction::getSelectionModifier()
Definition at line 1353 of file cvRenderViewSelectionReaction.cpp.
References CVLog::PrintVerbose(), SELECTION_ADDITION, SELECTION_DEFAULT, SELECTION_SUBTRACTION, and SELECTION_TOGGLE.
Referenced by onLeftButtonRelease(), and selectionChanged().
|
protected |
Get the selection pipeline.
Definition at line 1684 of file cvRenderViewSelectionReaction.cpp.
References cvViewSelectionManager::getPipeline(), and cvViewSelectionManager::instance().
Referenced by beginSelection(), clearSelectionCache(), endSelection(), onMiddleButtonRelease(), onRightButtonRelease(), onWheelRotate(), preSelection(), selectCellsOnSurface(), selectPointsOnSurface(), selectPolygonCells(), and selectPolygonPoints().
|
inline |
Get the current visualizer.
Definition at line 129 of file cvRenderViewSelectionReaction.h.
| void cvRenderViewSelectionReaction::handleLeftButtonPress | ( | ) |
Handle left button press (public for callback access)
Definition at line 243 of file cvRenderViewSelectionReaction.cpp.
References onLeftButtonPress().
| void cvRenderViewSelectionReaction::handleLeftButtonRelease | ( | ) |
Handle left button release (public for callback access)
Definition at line 247 of file cvRenderViewSelectionReaction.cpp.
References onLeftButtonRelease().
| void cvRenderViewSelectionReaction::handleMouseMove | ( | ) |
Handle mouse move event (public for callback access)
Definition at line 241 of file cvRenderViewSelectionReaction.cpp.
References onMouseMove().
| void cvRenderViewSelectionReaction::handleRightButtonPressed | ( | ) |
Handle right button press (public for callback access)
Definition at line 253 of file cvRenderViewSelectionReaction.cpp.
References onRightButtonPressed().
| void cvRenderViewSelectionReaction::handleRightButtonRelease | ( | ) |
Handle right button release (public for callback access)
Definition at line 257 of file cvRenderViewSelectionReaction.cpp.
References onRightButtonRelease().
| void cvRenderViewSelectionReaction::handleSelectionChanged | ( | vtkObject * | caller, |
| unsigned long | eventId, | ||
| void * | callData | ||
| ) |
Handle selection changed event from VTK (public for callback access)
Definition at line 236 of file cvRenderViewSelectionReaction.cpp.
References selectionChanged().
| void cvRenderViewSelectionReaction::handleWheelRotate | ( | ) |
Handle wheel rotation (public for callback access)
Definition at line 251 of file cvRenderViewSelectionReaction.cpp.
References onWheelRotate().
| bool cvRenderViewSelectionReaction::isActive | ( | ) | const |
Check if this reaction's selection is currently active.
Definition at line 221 of file cvRenderViewSelectionReaction.cpp.
Referenced by cvSelectionToolController::disableAllTools(), and setVisualizer().
|
protectedvirtual |
Check if this selection is compatible with another mode.
Used to determine if selection modifier buttons should remain active.
Reference: pqRenderViewSelectionReaction::isCompatible()
Definition at line 1402 of file cvRenderViewSelectionReaction.cpp.
References SELECT_FRUSTUM_CELLS, SELECT_FRUSTUM_POINTS, SELECT_SURFACE_CELLS, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTS, SELECT_SURFACE_POINTS_INTERACTIVELY, and SELECT_SURFACE_POINTS_POLYGON.
|
protected |
Check if this is an interactive selection mode.
Definition at line 1715 of file cvRenderViewSelectionReaction.cpp.
References SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTDATA_INTERACTIVELY, and SELECT_SURFACE_POINTS_INTERACTIVELY.
Referenced by selectionChanged().
|
protected |
Check if currently selecting cells (vs points)
Definition at line 1698 of file cvRenderViewSelectionReaction.cpp.
References HOVER_CELLS_TOOLTIP, SELECT_BLOCKS, SELECT_FRUSTUM_BLOCKS, SELECT_FRUSTUM_CELLS, SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS, SELECT_SURFACE_CELLS_INTERACTIVELY, and SELECT_SURFACE_CELLS_POLYGON.
Referenced by preSelection(), and updateTooltip().
|
protected |
Check if this is a tooltip mode.
Definition at line 1728 of file cvRenderViewSelectionReaction.cpp.
References HOVER_CELLS_TOOLTIP, and HOVER_POINTS_TOOLTIP.
Referenced by updateTooltip().
|
inline |
Get the selection mode.
Definition at line 116 of file cvRenderViewSelectionReaction.h.
|
protectedvirtual |
Handle left button press (for zoom tracking)
Definition at line 829 of file cvRenderViewSelectionReaction.cpp.
References ZOOM_TO_BOX.
Referenced by handleLeftButtonPress(), and vtkOnLeftButtonPress().
|
protectedvirtual |
Handle left button release (for interactive selection)
Reference: pqRenderViewSelectionReaction::onLeftButtonRelease()
Definition at line 851 of file cvRenderViewSelectionReaction.cpp.
References endSelection(), getSelectionModifier(), SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, selectCellsOnSurface(), SELECTION_ADDITION, SELECTION_DEFAULT, selectPointsOnSurface(), CVLog::Warning(), x, y, ZOOM_TO_BOX, and zoomToBoxCompleted().
Referenced by handleLeftButtonRelease(), and vtkOnLeftButtonRelease().
|
protectedvirtual |
Handle middle button press (disable pre-selection during pan)
Definition at line 958 of file cvRenderViewSelectionReaction.cpp.
Referenced by vtkOnMiddleButtonPressed().
|
protectedvirtual |
Handle middle button release (re-enable pre-selection, invalidate cache)
Definition at line 964 of file cvRenderViewSelectionReaction.cpp.
References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().
Referenced by vtkOnMiddleButtonRelease().
|
protectedvirtual |
Handle mouse move events (for interactive selection)
Reference: pqRenderViewSelectionReaction::onMouseMove()
Definition at line 789 of file cvRenderViewSelectionReaction.cpp.
References HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, preSelection(), SELECT_CUSTOM_POLYGON, SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, SELECT_SURFACE_POINTS_POLYGON, and CVLog::Warning().
Referenced by handleMouseMove(), onWheelRotate(), and vtkOnMouseMove().
|
protectedvirtualslot |
Handle mouse stop event (for tooltip display)
Reference: pqRenderViewSelectionReaction::onMouseStop()
Definition at line 615 of file cvRenderViewSelectionReaction.cpp.
References updateTooltip().
Referenced by cvRenderViewSelectionReaction().
|
protectedvirtual |
Handle right button press (disable pre-selection)
Definition at line 937 of file cvRenderViewSelectionReaction.cpp.
Referenced by handleRightButtonPressed(), and vtkOnRightButtonPressed().
|
protectedvirtual |
Handle right button release (re-enable pre-selection)
Definition at line 944 of file cvRenderViewSelectionReaction.cpp.
References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().
Referenced by handleRightButtonRelease(), and vtkOnRightButtonRelease().
|
protectedvirtual |
Handle wheel rotation events.
Reference: pqRenderViewSelectionReaction::onWheelRotate()
Definition at line 922 of file cvRenderViewSelectionReaction.cpp.
References getSelectionPipeline(), cvSelectionPipeline::invalidateCachedSelection(), and onMouseMove().
Referenced by handleWheelRotate(), and vtkOnWheelRotate().
|
inline |
Get the parent action.
Definition at line 111 of file cvRenderViewSelectionReaction.h.
Referenced by cvRenderViewSelectionReaction().
|
protectedvirtual |
Perform pre-selection highlighting.
Reference: pqRenderViewSelectionReaction::preSelection()
Definition at line 977 of file cvRenderViewSelectionReaction.cpp.
References cvSelectionPipeline::PixelSelectionInfo::attributeID, cvSelectionHighlighter::clearHoverHighlight(), cvSelectionPipeline::getPixelSelectionInfo(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionHighlighter::highlightElement(), isSelectingCells(), cvSelectionPipeline::PixelSelectionInfo::polyData, size, updateTooltip(), cvSelectionPipeline::PixelSelectionInfo::valid, x, and y.
Referenced by fastPreSelection(), and onMouseMove().
|
protected |
Restore previous interactor style.
Definition at line 1783 of file cvRenderViewSelectionReaction.cpp.
References getPCLVis().
Referenced by endSelection().
|
protected |
Select blocks.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
Definition at line 1666 of file cvRenderViewSelectionReaction.cpp.
References selectCellsOnSurface().
Referenced by selectionChanged().
|
protected |
Select cells on surface.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
Definition at line 1477 of file cvRenderViewSelectionReaction.cpp.
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectCellsOnSurface(), cvSelectionHighlighter::setHighlightsVisible(), and CVLog::Warning().
Referenced by onLeftButtonRelease(), selectBlock(), selectFrustumCells(), and selectionChanged().
|
signal |
|
signal |
Emitted for custom box selection.
| region | The selected region [x1, y1, x2, y2] |
|
signal |
Emitted for custom polygon selection.
| polygon | Array of polygon vertices |
Referenced by selectionChanged().
|
protected |
Select cells in frustum.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
Definition at line 1537 of file cvRenderViewSelectionReaction.cpp.
References selectCellsOnSurface().
Referenced by selectionChanged().
|
protected |
Select points in frustum.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
Definition at line 1545 of file cvRenderViewSelectionReaction.cpp.
References selectPointsOnSurface().
Referenced by selectionChanged().
|
protectedvirtual |
Callback for selection changed event from VTK.
This is the main callback that executes the selection logic.
| caller | The VTK object that triggered the event |
| eventId | The event ID |
| callData | Event-specific data (region or polygon) |
Reference: pqRenderViewSelectionReaction::selectionChanged()
Definition at line 638 of file cvRenderViewSelectionReaction.cpp.
References endSelection(), getSelectionModifier(), isInteractiveMode(), points, SELECT_BLOCKS, SELECT_CUSTOM_POLYGON, SELECT_FRUSTUM_CELLS, SELECT_FRUSTUM_POINTS, SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS, SELECT_SURFACE_POINTS_INTERACTIVELY, SELECT_SURFACE_POINTS_POLYGON, selectBlock(), selectCellsOnSurface(), selectedCustomPolygon(), selectFrustumCells(), selectFrustumPoints(), selectPointsOnSurface(), selectPolygonCells(), selectPolygonPoints(), CVLog::Warning(), and ZOOM_TO_BOX.
Referenced by handleSelectionChanged(), and vtkOnSelectionChanged().
|
signal |
Emitted when selection is finished.
| selectionData | The resulting selection data |
Referenced by finalizeSelection(), and cvSelectionToolController::registerAction().
|
protected |
Select points on surface.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
Definition at line 1507 of file cvRenderViewSelectionReaction.cpp.
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectPointsOnSurface(), cvSelectionHighlighter::setHighlightsVisible(), and CVLog::Warning().
Referenced by onLeftButtonRelease(), selectFrustumPoints(), and selectionChanged().
|
protected |
Select cells in polygon.
| polygon | Polygon vertices |
| selectionModifier | Selection modifier |
Definition at line 1624 of file cvRenderViewSelectionReaction.cpp.
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectCellsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().
Referenced by selectionChanged().
|
protected |
Select points in polygon.
| polygon | Polygon vertices |
| selectionModifier | Selection modifier |
Definition at line 1645 of file cvRenderViewSelectionReaction.cpp.
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectPointsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().
Referenced by selectionChanged().
|
protected |
Set cursor on the view.
Definition at line 1734 of file cvRenderViewSelectionReaction.cpp.
References ecvDisplayTools::GetCurrentScreen().
Referenced by setupInteractorStyle().
|
protected |
Set vtkInteractorStyleRubberBand3D as the interactor style.
| renderOnMouseMove | Whether to render on mouse move events |
This style disables rotation: Left=RubberBand, Middle=Pan, Right=Zoom
Definition at line 1805 of file cvRenderViewSelectionReaction.cpp.
Referenced by setupInteractorStyle().
|
protected |
Set up interactor style for this selection mode.
Definition at line 1821 of file cvRenderViewSelectionReaction.cpp.
References HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, SELECT_BLOCKS, SELECT_CUSTOM_POLYGON, SELECT_FRUSTUM_BLOCKS, SELECT_FRUSTUM_CELLS, SELECT_FRUSTUM_POINTS, SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS, SELECT_SURFACE_POINTS_INTERACTIVELY, SELECT_SURFACE_POINTS_POLYGON, setCursor(), setRubberBand3DStyle(), storeCurrentStyle(), unsetCursor(), and ZOOM_TO_BOX.
Referenced by beginSelection().
|
protected |
Set up event observers for this selection mode.
Definition at line 1888 of file cvRenderViewSelectionReaction.cpp.
References addCameraMovementObservers(), CLEAR_SELECTION, GROW_SELECTION, HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_INTERACTIVELY, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_INTERACTIVELY, SHRINK_SELECTION, vtkOnLeftButtonPress(), vtkOnLeftButtonRelease(), vtkOnMouseMove(), vtkOnSelectionChanged(), and ZOOM_TO_BOX.
Referenced by beginSelection().
| void cvRenderViewSelectionReaction::setVisualizer | ( | ecvGenericVisualizer3D * | viewer | ) |
Set the visualizer for selection operations.
| viewer | The generic 3D visualizer |
This should be called once before any selection operations.
Definition at line 193 of file cvRenderViewSelectionReaction.cpp.
References endSelection(), PclUtils::PCLVis::getCurrentRenderer(), getPCLVis(), PclUtils::PCLVis::getRenderWindowInteractor(), isActive(), and updateEnableState().
Referenced by cvSelectionToolController::registerAction().
|
protected |
Show instruction dialog for interactive modes.
Definition at line 1978 of file cvRenderViewSelectionReaction.cpp.
References HOVER_CELLS_TOOLTIP, HOVER_POINTS_TOOLTIP, cvSelectionPipeline::promptUser(), SELECT_SURFACE_CELLS_INTERACTIVELY, and SELECT_SURFACE_POINTS_INTERACTIVELY.
Referenced by beginSelection().
|
protected |
Store current interactor style.
Definition at line 1751 of file cvRenderViewSelectionReaction.cpp.
References CVLog::PrintVerbose().
Referenced by setupInteractorStyle().
|
protected |
Uncheck selection modifier buttons.
Definition at line 1464 of file cvRenderViewSelectionReaction.cpp.
Referenced by beginSelection().
|
protected |
Restore default cursor.
Definition at line 1742 of file cvRenderViewSelectionReaction.cpp.
References ecvDisplayTools::GetCurrentScreen().
Referenced by endSelection(), and setupInteractorStyle().
|
virtualslot |
Updates the enabled state of the action.
Handles enable state for CLEAR_SELECTION, GROW_SELECTION, and SHRINK_SELECTION modes.
Reference: pqRenderViewSelectionReaction::updateEnableState()
Definition at line 349 of file cvRenderViewSelectionReaction.cpp.
References cvViewSelectionManager::canShrinkSelection(), CLEAR_SELECTION, endSelection(), GROW_SELECTION, cvViewSelectionManager::hasSelection(), cvViewSelectionManager::instance(), SELECT_SURFACE_CELLDATA_INTERACTIVELY, SELECT_SURFACE_CELLS_POLYGON, SELECT_SURFACE_POINTDATA_INTERACTIVELY, SELECT_SURFACE_POINTS_POLYGON, and SHRINK_SELECTION.
Referenced by cvRenderViewSelectionReaction(), and setVisualizer().
|
protectedvirtual |
Update tooltip display.
Reference: pqRenderViewSelectionReaction::UpdateTooltip()
Definition at line 1058 of file cvRenderViewSelectionReaction.cpp.
References QtCompatRegExpOption::CaseInsensitive, cloudViewer::utility::filesystem::Copy(), ecvDisplayTools::GetCurrentScreen(), isSelectingCells(), isTooltipMode(), name, and result.
Referenced by endSelection(), onMouseStop(), and preSelection().
|
protected |
Definition at line 278 of file cvRenderViewSelectionReaction.cpp.
References onLeftButtonPress().
Referenced by setupObservers().
|
protected |
Definition at line 284 of file cvRenderViewSelectionReaction.cpp.
References onLeftButtonRelease().
Referenced by setupObservers().
|
protected |
Definition at line 308 of file cvRenderViewSelectionReaction.cpp.
References onMiddleButtonPressed().
Referenced by addCameraMovementObservers().
|
protected |
Definition at line 314 of file cvRenderViewSelectionReaction.cpp.
References onMiddleButtonRelease().
Referenced by addCameraMovementObservers().
|
protected |
Definition at line 272 of file cvRenderViewSelectionReaction.cpp.
References onMouseMove().
Referenced by setupObservers().
|
protected |
Definition at line 296 of file cvRenderViewSelectionReaction.cpp.
References onRightButtonPressed().
Referenced by addCameraMovementObservers().
|
protected |
Definition at line 302 of file cvRenderViewSelectionReaction.cpp.
References onRightButtonRelease().
Referenced by addCameraMovementObservers().
|
protected |
VTK callback functions for observer pattern.
These methods follow VTK's callback signature and are used with vtkObject::AddObserver() to directly bind member functions. This matches ParaView's implementation pattern.
Reference: pqRenderViewSelectionReaction uses the same pattern
Definition at line 266 of file cvRenderViewSelectionReaction.cpp.
References selectionChanged().
Referenced by setupObservers().
|
protected |
Definition at line 290 of file cvRenderViewSelectionReaction.cpp.
References onWheelRotate().
Referenced by addCameraMovementObservers().
|
signal |
Emitted when zoom to box is completed.
Referenced by onLeftButtonRelease(), and cvSelectionToolController::registerAction().