![]() |
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}
| 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 |
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 |
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()
References beginSelection(), and endSelection().
Referenced by cvRenderViewSelectionReaction().
|
inlinestatic |
Get the currently active reaction (static)
Reference: pqRenderViewSelectionReaction::ActiveReaction
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
References vtkOnMiddleButtonPressed(), vtkOnMiddleButtonRelease(), vtkOnRightButtonPressed(), vtkOnRightButtonRelease(), and vtkOnWheelRotate().
Referenced by setupObservers().
|
protectedvirtualslot |
Starts the selection mode.
This will:
Reference: pqRenderViewSelectionReaction::beginSelection()
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()
Referenced by endSelection(), and ~cvRenderViewSelectionReaction().
|
protectedvirtualslot |
Clear selection cache when data changes.
Reference: pqRenderViewSelectionReaction::clearSelectionCache()
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.
Referenced by cvSelectionToolController::disableAllTools().
|
protectedvirtualslot |
Ends the selection mode.
This will:
Reference: pqRenderViewSelectionReaction::endSelection()
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()
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 |
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.
Referenced by beginSelection(), endSelection(), finalizeSelection(), restoreStyle(), and setVisualizer().
|
protected |
Get the selection highlighter.
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()
References CVLog::PrintVerbose(), SELECTION_ADDITION, SELECTION_DEFAULT, SELECTION_SUBTRACTION, and SELECTION_TOGGLE.
Referenced by onLeftButtonRelease(), and selectionChanged().
|
protected |
Get the selection pipeline.
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.
| void cvRenderViewSelectionReaction::handleLeftButtonPress | ( | ) |
Handle left button press (public for callback access)
References onLeftButtonPress().
| void cvRenderViewSelectionReaction::handleLeftButtonRelease | ( | ) |
Handle left button release (public for callback access)
References onLeftButtonRelease().
| void cvRenderViewSelectionReaction::handleMouseMove | ( | ) |
Handle mouse move event (public for callback access)
References onMouseMove().
| void cvRenderViewSelectionReaction::handleRightButtonPressed | ( | ) |
Handle right button press (public for callback access)
References onRightButtonPressed().
| void cvRenderViewSelectionReaction::handleRightButtonRelease | ( | ) |
Handle right button release (public for callback access)
References onRightButtonRelease().
| void cvRenderViewSelectionReaction::handleSelectionChanged | ( | vtkObject * | caller, |
| unsigned long | eventId, | ||
| void * | callData | ||
| ) |
Handle selection changed event from VTK (public for callback access)
References selectionChanged().
| void cvRenderViewSelectionReaction::handleWheelRotate | ( | ) |
Handle wheel rotation (public for callback access)
References onWheelRotate().
| bool cvRenderViewSelectionReaction::isActive | ( | ) | const |
Check if this reaction's selection is currently active.
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()
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.
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)
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.
References HOVER_CELLS_TOOLTIP, and HOVER_POINTS_TOOLTIP.
Referenced by updateTooltip().
|
inline |
Get the selection mode.
|
protectedvirtual |
Handle left button press (for zoom tracking)
References ZOOM_TO_BOX.
Referenced by handleLeftButtonPress(), and vtkOnLeftButtonPress().
|
protectedvirtual |
Handle left button release (for interactive selection)
Reference: pqRenderViewSelectionReaction::onLeftButtonRelease()
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)
Referenced by vtkOnMiddleButtonPressed().
|
protectedvirtual |
Handle middle button release (re-enable pre-selection, invalidate cache)
References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().
Referenced by vtkOnMiddleButtonRelease().
|
protectedvirtual |
Handle mouse move events (for interactive selection)
Reference: pqRenderViewSelectionReaction::onMouseMove()
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()
References updateTooltip().
Referenced by cvRenderViewSelectionReaction().
|
protectedvirtual |
Handle right button press (disable pre-selection)
Referenced by handleRightButtonPressed(), and vtkOnRightButtonPressed().
|
protectedvirtual |
Handle right button release (re-enable pre-selection)
References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().
Referenced by handleRightButtonRelease(), and vtkOnRightButtonRelease().
|
protectedvirtual |
Handle wheel rotation events.
Reference: pqRenderViewSelectionReaction::onWheelRotate()
References getSelectionPipeline(), cvSelectionPipeline::invalidateCachedSelection(), and onMouseMove().
Referenced by handleWheelRotate(), and vtkOnWheelRotate().
|
inline |
Get the parent action.
Referenced by cvRenderViewSelectionReaction().
|
protectedvirtual |
Perform pre-selection highlighting.
Reference: pqRenderViewSelectionReaction::preSelection()
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 |
|
protected |
Select blocks.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
References selectCellsOnSurface().
Referenced by selectionChanged().
|
protected |
Select cells on surface.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
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 |
References selectCellsOnSurface().
Referenced by selectionChanged().
|
protected |
Select points in frustum.
| region | Screen-space rectangle [x1, y1, x2, y2] |
| selectionModifier | Selection modifier |
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()
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 |
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 |
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectCellsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().
Referenced by selectionChanged().
|
protected |
Select points in polygon.
| polygon | Polygon vertices |
| selectionModifier | Selection modifier |
References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectPointsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().
Referenced by selectionChanged().
|
protected |
Set cursor on the view.
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
Referenced by setupInteractorStyle().
|
protected |
Set up interactor style for this selection mode.
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.
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.
References endSelection(), PclUtils::PCLVis::getCurrentRenderer(), getPCLVis(), PclUtils::PCLVis::getRenderWindowInteractor(), isActive(), and updateEnableState().
Referenced by cvSelectionToolController::registerAction().
|
protected |
Show instruction dialog for interactive modes.
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.
References CVLog::PrintVerbose().
Referenced by setupInteractorStyle().
|
protected |
Uncheck selection modifier buttons.
Referenced by beginSelection().
|
protected |
Restore default cursor.
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()
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()
References QtCompatRegExpOption::CaseInsensitive, cloudViewer::utility::filesystem::Copy(), ecvDisplayTools::GetCurrentScreen(), isSelectingCells(), isTooltipMode(), name, and result.
Referenced by endSelection(), onMouseStop(), and preSelection().
|
protected |
References onLeftButtonPress().
Referenced by setupObservers().
|
protected |
References onLeftButtonRelease().
Referenced by setupObservers().
|
protected |
References onMiddleButtonPressed().
Referenced by addCameraMovementObservers().
|
protected |
References onMiddleButtonRelease().
Referenced by addCameraMovementObservers().
|
protected |
References onMouseMove().
Referenced by setupObservers().
|
protected |
References onRightButtonPressed().
Referenced by addCameraMovementObservers().
|
protected |
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
References selectionChanged().
Referenced by setupObservers().
|
protected |
References onWheelRotate().
Referenced by addCameraMovementObservers().
|
signal |
Emitted when zoom to box is completed.
Referenced by onLeftButtonRelease(), and cvSelectionToolController::registerAction().