ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvRenderViewSelectionReaction Class Reference

cvRenderViewSelectionReaction handles all selection modes in a single class More...

#include <cvRenderViewSelectionReaction.h>

Inheritance diagram for cvRenderViewSelectionReaction:
Collaboration diagram for cvRenderViewSelectionReaction:

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...
 
ecvGenericVisualizer3DgetVisualizer () 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 cvRenderViewSelectionReactionactiveReaction ()
 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::PCLVisgetPCLVis () const
 Get the PCLVis instance. More...
 
cvSelectionPipelinegetSelectionPipeline () const
 Get the selection pipeline. More...
 
cvSelectionHighlightergetSelectionHighlighter () 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)
 

Detailed Description

cvRenderViewSelectionReaction handles all selection modes in a single class

This class follows ParaView's pqRenderViewSelectionReaction pattern:

  • One instance per selection action (button/menu item)
  • Static ActiveReaction tracks the currently active selection
  • beginSelection()/endSelection() handle all state transitions
  • All cursor, interactor style, and observer management is internal

Key improvements over the previous multi-layer architecture:

  • No separate cvViewSelectionManager layer
  • No separate cvRenderViewSelectionTool layer
  • All selection logic in one place for easier maintenance
  • Direct alignment with ParaView's proven architecture

Reference: pqRenderViewSelectionReaction.{h,cxx}

Definition at line 89 of file cvRenderViewSelectionReaction.h.

Member Typedef Documentation

◆ SelectionMode

◆ SelectionModifier

Constructor & Destructor Documentation

◆ cvRenderViewSelectionReaction()

cvRenderViewSelectionReaction::cvRenderViewSelectionReaction ( QAction *  parentAction,
SelectionMode  mode,
QActionGroup *  modifierGroup = nullptr 
)

◆ ~cvRenderViewSelectionReaction()

cvRenderViewSelectionReaction::~cvRenderViewSelectionReaction ( )
override

Definition at line 177 of file cvRenderViewSelectionReaction.cpp.

References cleanupObservers().

Member Function Documentation

◆ actionTriggered

void cvRenderViewSelectionReaction::actionTriggered ( bool  val)
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().

◆ activeReaction()

static cvRenderViewSelectionReaction* cvRenderViewSelectionReaction::activeReaction ( )
inlinestatic

Get the currently active reaction (static)

Returns
The currently active reaction, or nullptr if none

Reference: pqRenderViewSelectionReaction::ActiveReaction

Definition at line 142 of file cvRenderViewSelectionReaction.h.

Referenced by cvSelectionToolController::isAnyToolActive().

◆ addCameraMovementObservers()

void cvRenderViewSelectionReaction::addCameraMovementObservers ( int  startIndex)
protected

Add camera movement observers for cache invalidation.

Parameters
startIndexStarting 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().

◆ beginSelection

void cvRenderViewSelectionReaction::beginSelection ( )
protectedvirtualslot

Starts the selection mode.

This will:

  1. End any other active selection
  2. Store the current interactor style
  3. Set up the selection-specific interactor style
  4. Change the cursor
  5. Register event observers
  6. Set parentAction as checked

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().

◆ cleanupObservers()

void cvRenderViewSelectionReaction::cleanupObservers ( )
protectedvirtual

Clean up event observers.

Reference: pqRenderViewSelectionReaction::cleanupObservers()

Definition at line 1438 of file cvRenderViewSelectionReaction.cpp.

Referenced by endSelection(), and ~cvRenderViewSelectionReaction().

◆ clearSelectionCache

void cvRenderViewSelectionReaction::clearSelectionCache ( )
protectedvirtualslot

Clear selection cache when data changes.

Reference: pqRenderViewSelectionReaction::clearSelectionCache()

Definition at line 623 of file cvRenderViewSelectionReaction.cpp.

References getSelectionPipeline(), and cvSelectionPipeline::invalidateCachedSelection().

◆ endActiveSelection()

void cvRenderViewSelectionReaction::endActiveSelection ( )
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().

◆ endSelection

void cvRenderViewSelectionReaction::endSelection ( )
protectedvirtualslot

Ends the selection mode.

This will:

  1. Restore the previous interactor style
  2. Restore the cursor
  3. Remove event observers
  4. Set parentAction as unchecked
  5. Clean up resources

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().

◆ fastPreSelection()

void cvRenderViewSelectionReaction::fastPreSelection ( )
protectedvirtual

Perform fast pre-selection using cached buffers.

Reference: pqRenderViewSelectionReaction::fastPreSelection()

Definition at line 1048 of file cvRenderViewSelectionReaction.cpp.

References preSelection().

◆ finalizeSelection()

void cvRenderViewSelectionReaction::finalizeSelection ( const cvSelectionData newSelection,
int  selectionModifier,
const QString &  description 
)
protected

◆ getPCLVis()

PclUtils::PCLVis * cvRenderViewSelectionReaction::getPCLVis ( ) const
protected

Get the PCLVis instance.

Definition at line 1676 of file cvRenderViewSelectionReaction.cpp.

Referenced by beginSelection(), endSelection(), finalizeSelection(), restoreStyle(), and setVisualizer().

◆ getSelectionHighlighter()

cvSelectionHighlighter * cvRenderViewSelectionReaction::getSelectionHighlighter ( ) const
protected

◆ getSelectionModifier()

int cvRenderViewSelectionReaction::getSelectionModifier ( )
protectedvirtual

Get the selection modifier from keyboard state.

Returns
The current selection modifier

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().

◆ getSelectionPipeline()

◆ getVisualizer()

ecvGenericVisualizer3D* cvRenderViewSelectionReaction::getVisualizer ( ) const
inline

Get the current visualizer.

Definition at line 129 of file cvRenderViewSelectionReaction.h.

◆ handleLeftButtonPress()

void cvRenderViewSelectionReaction::handleLeftButtonPress ( )

Handle left button press (public for callback access)

Definition at line 243 of file cvRenderViewSelectionReaction.cpp.

References onLeftButtonPress().

◆ handleLeftButtonRelease()

void cvRenderViewSelectionReaction::handleLeftButtonRelease ( )

Handle left button release (public for callback access)

Definition at line 247 of file cvRenderViewSelectionReaction.cpp.

References onLeftButtonRelease().

◆ handleMouseMove()

void cvRenderViewSelectionReaction::handleMouseMove ( )

Handle mouse move event (public for callback access)

Definition at line 241 of file cvRenderViewSelectionReaction.cpp.

References onMouseMove().

◆ handleRightButtonPressed()

void cvRenderViewSelectionReaction::handleRightButtonPressed ( )

Handle right button press (public for callback access)

Definition at line 253 of file cvRenderViewSelectionReaction.cpp.

References onRightButtonPressed().

◆ handleRightButtonRelease()

void cvRenderViewSelectionReaction::handleRightButtonRelease ( )

Handle right button release (public for callback access)

Definition at line 257 of file cvRenderViewSelectionReaction.cpp.

References onRightButtonRelease().

◆ handleSelectionChanged()

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().

◆ handleWheelRotate()

void cvRenderViewSelectionReaction::handleWheelRotate ( )

Handle wheel rotation (public for callback access)

Definition at line 251 of file cvRenderViewSelectionReaction.cpp.

References onWheelRotate().

◆ isActive()

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().

◆ isCompatible()

bool cvRenderViewSelectionReaction::isCompatible ( SelectionMode  mode)
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.

◆ isInteractiveMode()

bool cvRenderViewSelectionReaction::isInteractiveMode ( ) const
protected

◆ isSelectingCells()

bool cvRenderViewSelectionReaction::isSelectingCells ( ) const
protected

◆ isTooltipMode()

bool cvRenderViewSelectionReaction::isTooltipMode ( ) const
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().

◆ mode()

SelectionMode cvRenderViewSelectionReaction::mode ( ) const
inline

Get the selection mode.

Definition at line 116 of file cvRenderViewSelectionReaction.h.

◆ onLeftButtonPress()

void cvRenderViewSelectionReaction::onLeftButtonPress ( )
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().

◆ onLeftButtonRelease()

void cvRenderViewSelectionReaction::onLeftButtonRelease ( )
protectedvirtual

◆ onMiddleButtonPressed()

void cvRenderViewSelectionReaction::onMiddleButtonPressed ( )
protectedvirtual

Handle middle button press (disable pre-selection during pan)

Definition at line 958 of file cvRenderViewSelectionReaction.cpp.

Referenced by vtkOnMiddleButtonPressed().

◆ onMiddleButtonRelease()

void cvRenderViewSelectionReaction::onMiddleButtonRelease ( )
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().

◆ onMouseMove()

void cvRenderViewSelectionReaction::onMouseMove ( )
protectedvirtual

◆ onMouseStop

void cvRenderViewSelectionReaction::onMouseStop ( )
protectedvirtualslot

Handle mouse stop event (for tooltip display)

Reference: pqRenderViewSelectionReaction::onMouseStop()

Definition at line 615 of file cvRenderViewSelectionReaction.cpp.

References updateTooltip().

Referenced by cvRenderViewSelectionReaction().

◆ onRightButtonPressed()

void cvRenderViewSelectionReaction::onRightButtonPressed ( )
protectedvirtual

Handle right button press (disable pre-selection)

Definition at line 937 of file cvRenderViewSelectionReaction.cpp.

Referenced by handleRightButtonPressed(), and vtkOnRightButtonPressed().

◆ onRightButtonRelease()

void cvRenderViewSelectionReaction::onRightButtonRelease ( )
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().

◆ onWheelRotate()

void cvRenderViewSelectionReaction::onWheelRotate ( )
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().

◆ parentAction()

QAction* cvRenderViewSelectionReaction::parentAction ( ) const
inline

Get the parent action.

Definition at line 111 of file cvRenderViewSelectionReaction.h.

Referenced by cvRenderViewSelectionReaction().

◆ preSelection()

◆ restoreStyle()

void cvRenderViewSelectionReaction::restoreStyle ( )
protected

Restore previous interactor style.

Definition at line 1783 of file cvRenderViewSelectionReaction.cpp.

References getPCLVis().

Referenced by endSelection().

◆ selectBlock()

void cvRenderViewSelectionReaction::selectBlock ( int  region[4],
int  selectionModifier 
)
protected

Select blocks.

Parameters
regionScreen-space rectangle [x1, y1, x2, y2]
selectionModifierSelection modifier

Definition at line 1666 of file cvRenderViewSelectionReaction.cpp.

References selectCellsOnSurface().

Referenced by selectionChanged().

◆ selectCellsOnSurface()

void cvRenderViewSelectionReaction::selectCellsOnSurface ( int  region[4],
int  selectionModifier 
)
protected

Select cells on surface.

Parameters
regionScreen-space rectangle [x1, y1, x2, y2]
selectionModifierSelection 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().

◆ selectedCustomBox [1/2]

void cvRenderViewSelectionReaction::selectedCustomBox ( const int  region[4])
signal

◆ selectedCustomBox [2/2]

void cvRenderViewSelectionReaction::selectedCustomBox ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
)
signal

Emitted for custom box selection.

Parameters
regionThe selected region [x1, y1, x2, y2]

◆ selectedCustomPolygon

void cvRenderViewSelectionReaction::selectedCustomPolygon ( vtkIntArray *  polygon)
signal

Emitted for custom polygon selection.

Parameters
polygonArray of polygon vertices

Referenced by selectionChanged().

◆ selectFrustumCells()

void cvRenderViewSelectionReaction::selectFrustumCells ( int  region[4],
int  selectionModifier 
)
protected

Select cells in frustum.

Parameters
regionScreen-space rectangle [x1, y1, x2, y2]
selectionModifierSelection modifier

Definition at line 1537 of file cvRenderViewSelectionReaction.cpp.

References selectCellsOnSurface().

Referenced by selectionChanged().

◆ selectFrustumPoints()

void cvRenderViewSelectionReaction::selectFrustumPoints ( int  region[4],
int  selectionModifier 
)
protected

Select points in frustum.

Parameters
regionScreen-space rectangle [x1, y1, x2, y2]
selectionModifierSelection modifier

Definition at line 1545 of file cvRenderViewSelectionReaction.cpp.

References selectPointsOnSurface().

Referenced by selectionChanged().

◆ selectionChanged()

void cvRenderViewSelectionReaction::selectionChanged ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protectedvirtual

◆ selectionFinished

void cvRenderViewSelectionReaction::selectionFinished ( const cvSelectionData selectionData)
signal

Emitted when selection is finished.

Parameters
selectionDataThe resulting selection data

Referenced by finalizeSelection(), and cvSelectionToolController::registerAction().

◆ selectPointsOnSurface()

void cvRenderViewSelectionReaction::selectPointsOnSurface ( int  region[4],
int  selectionModifier 
)
protected

Select points on surface.

Parameters
regionScreen-space rectangle [x1, y1, x2, y2]
selectionModifierSelection 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().

◆ selectPolygonCells()

void cvRenderViewSelectionReaction::selectPolygonCells ( vtkIntArray *  polygon,
int  selectionModifier 
)
protected

Select cells in polygon.

Parameters
polygonPolygon vertices
selectionModifierSelection modifier

Definition at line 1624 of file cvRenderViewSelectionReaction.cpp.

References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectCellsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().

Referenced by selectionChanged().

◆ selectPolygonPoints()

void cvRenderViewSelectionReaction::selectPolygonPoints ( vtkIntArray *  polygon,
int  selectionModifier 
)
protected

Select points in polygon.

Parameters
polygonPolygon vertices
selectionModifierSelection modifier

Definition at line 1645 of file cvRenderViewSelectionReaction.cpp.

References finalizeSelection(), getSelectionHighlighter(), getSelectionPipeline(), cvSelectionPipeline::selectPointsInPolygon(), and cvSelectionHighlighter::setHighlightsVisible().

Referenced by selectionChanged().

◆ setCursor()

void cvRenderViewSelectionReaction::setCursor ( const QCursor &  cursor)
protected

Set cursor on the view.

Definition at line 1734 of file cvRenderViewSelectionReaction.cpp.

References ecvDisplayTools::GetCurrentScreen().

Referenced by setupInteractorStyle().

◆ setRubberBand3DStyle()

void cvRenderViewSelectionReaction::setRubberBand3DStyle ( bool  renderOnMouseMove)
protected

Set vtkInteractorStyleRubberBand3D as the interactor style.

Parameters
renderOnMouseMoveWhether 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().

◆ setupInteractorStyle()

◆ setupObservers()

◆ setVisualizer()

void cvRenderViewSelectionReaction::setVisualizer ( ecvGenericVisualizer3D viewer)

Set the visualizer for selection operations.

Parameters
viewerThe 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().

◆ showInstructionDialog()

void cvRenderViewSelectionReaction::showInstructionDialog ( )
protected

◆ storeCurrentStyle()

void cvRenderViewSelectionReaction::storeCurrentStyle ( )
protected

Store current interactor style.

Definition at line 1751 of file cvRenderViewSelectionReaction.cpp.

References CVLog::PrintVerbose().

Referenced by setupInteractorStyle().

◆ uncheckSelectionModifiers()

void cvRenderViewSelectionReaction::uncheckSelectionModifiers ( )
protected

Uncheck selection modifier buttons.

Definition at line 1464 of file cvRenderViewSelectionReaction.cpp.

Referenced by beginSelection().

◆ unsetCursor()

void cvRenderViewSelectionReaction::unsetCursor ( )
protected

Restore default cursor.

Definition at line 1742 of file cvRenderViewSelectionReaction.cpp.

References ecvDisplayTools::GetCurrentScreen().

Referenced by endSelection(), and setupInteractorStyle().

◆ updateEnableState

void cvRenderViewSelectionReaction::updateEnableState ( )
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().

◆ updateTooltip()

void cvRenderViewSelectionReaction::updateTooltip ( )
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().

◆ vtkOnLeftButtonPress()

void cvRenderViewSelectionReaction::vtkOnLeftButtonPress ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 278 of file cvRenderViewSelectionReaction.cpp.

References onLeftButtonPress().

Referenced by setupObservers().

◆ vtkOnLeftButtonRelease()

void cvRenderViewSelectionReaction::vtkOnLeftButtonRelease ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 284 of file cvRenderViewSelectionReaction.cpp.

References onLeftButtonRelease().

Referenced by setupObservers().

◆ vtkOnMiddleButtonPressed()

void cvRenderViewSelectionReaction::vtkOnMiddleButtonPressed ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 308 of file cvRenderViewSelectionReaction.cpp.

References onMiddleButtonPressed().

Referenced by addCameraMovementObservers().

◆ vtkOnMiddleButtonRelease()

void cvRenderViewSelectionReaction::vtkOnMiddleButtonRelease ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 314 of file cvRenderViewSelectionReaction.cpp.

References onMiddleButtonRelease().

Referenced by addCameraMovementObservers().

◆ vtkOnMouseMove()

void cvRenderViewSelectionReaction::vtkOnMouseMove ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 272 of file cvRenderViewSelectionReaction.cpp.

References onMouseMove().

Referenced by setupObservers().

◆ vtkOnRightButtonPressed()

void cvRenderViewSelectionReaction::vtkOnRightButtonPressed ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 296 of file cvRenderViewSelectionReaction.cpp.

References onRightButtonPressed().

Referenced by addCameraMovementObservers().

◆ vtkOnRightButtonRelease()

void cvRenderViewSelectionReaction::vtkOnRightButtonRelease ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 302 of file cvRenderViewSelectionReaction.cpp.

References onRightButtonRelease().

Referenced by addCameraMovementObservers().

◆ vtkOnSelectionChanged()

void cvRenderViewSelectionReaction::vtkOnSelectionChanged ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
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().

◆ vtkOnWheelRotate()

void cvRenderViewSelectionReaction::vtkOnWheelRotate ( vtkObject *  caller,
unsigned long  eventId,
void *  callData 
)
protected

Definition at line 290 of file cvRenderViewSelectionReaction.cpp.

References onWheelRotate().

Referenced by addCameraMovementObservers().

◆ zoomToBoxCompleted

void cvRenderViewSelectionReaction::zoomToBoxCompleted ( int  xmin,
int  ymin,
int  xmax,
int  ymax 
)
signal

Emitted when zoom to box is completed.

Referenced by onLeftButtonRelease(), and cvSelectionToolController::registerAction().


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