OGS
|
VtkCustomInteractorStyle implements highlighting of an active actor and highlighting of picked cells inside a vtk object. Picking occurs when a vtk object was selected, the alternate mouse mode is active (hold spacebar) and the user left clicks. On right click the cameras focal point (center of rotation) is set to the picking position.
Definition at line 35 of file VtkCustomInteractorStyle.h.
#include <VtkCustomInteractorStyle.h>
Public Slots | |
void | highlightActor (vtkProp3D *actor) |
void | removeHighlightActor () |
Removes the highlight actor from the visible scene. | |
void | setHighlightActor (bool on) |
void | pickableDataObject (vtkDataObject *object) |
Sets the highlightable vtk object. | |
Signals | |
void | requestViewUpdate () |
Emitted when something was picked. | |
void | cursorChanged (Qt::CursorShape) |
Emitted when the cursor shape was changed due to alternate mouse action mode. | |
void | elementPicked (vtkUnstructuredGridAlgorithm const *const, unsigned) |
Emitted when a mesh element has been picked. | |
void | clearElementView () |
Emitted when the current object type cannot be handled by the element model. | |
Public Member Functions | |
vtkTypeMacro (VtkCustomInteractorStyle, vtkInteractorStyleTrackballCamera) | |
void | OnChar () override |
Handles key press events. | |
void | OnKeyDown () override |
Handles key down events. | |
void | OnKeyUp () override |
Handles key up events. | |
void | OnLeftButtonDown () override |
Handles left mouse button events (picking). | |
void | OnRightButtonDown () override |
Handles middle mouse button events (rotation point picking). | |
Static Public Member Functions | |
static VtkCustomInteractorStyle * | New () |
Protected Member Functions | |
VtkCustomInteractorStyle () | |
~VtkCustomInteractorStyle () override | |
Protected Attributes | |
vtkDataObject * | _data {nullptr} |
The vtk object to pick. | |
vtkDataSetMapper * | _selectedMapper |
The mapper for highlighting the selected cell. | |
vtkActor * | _selectedActor |
The actor for highlighting the selected cell. | |
Private Attributes | |
bool | _highlightActor {false} |
bool | _alternateMouseActions {false} |
|
protected |
Definition at line 45 of file VtkCustomInteractorStyle.cpp.
References _selectedActor, and _selectedMapper.
|
overrideprotected |
Definition at line 55 of file VtkCustomInteractorStyle.cpp.
References _selectedActor, and _selectedMapper.
|
signal |
Emitted when the current object type cannot be handled by the element model.
Referenced by OnLeftButtonDown().
|
signal |
Emitted when the cursor shape was changed due to alternate mouse action mode.
Referenced by OnKeyDown(), and OnKeyUp().
|
signal |
Emitted when a mesh element has been picked.
Referenced by OnLeftButtonDown().
|
slot |
Definition at line 101 of file VtkCustomInteractorStyle.cpp.
References _highlightActor.
|
static |
Referenced by VisualizationWidget::VisualizationWidget().
|
override |
Handles key press events.
Definition at line 61 of file VtkCustomInteractorStyle.cpp.
References INFO().
|
override |
Handles key down events.
Definition at line 75 of file VtkCustomInteractorStyle.cpp.
References _alternateMouseActions, and cursorChanged().
|
override |
Handles key up events.
Definition at line 88 of file VtkCustomInteractorStyle.cpp.
References _alternateMouseActions, and cursorChanged().
|
override |
Handles left mouse button events (picking).
Definition at line 140 of file VtkCustomInteractorStyle.cpp.
References _alternateMouseActions, _data, _selectedActor, _selectedMapper, clearElementView(), elementPicked(), INFO(), and requestViewUpdate().
|
override |
Handles middle mouse button events (rotation point picking).
Definition at line 242 of file VtkCustomInteractorStyle.cpp.
References _alternateMouseActions, _data, INFO(), and requestViewUpdate().
|
slot |
Sets the highlightable vtk object.
Definition at line 126 of file VtkCustomInteractorStyle.cpp.
References _data, _selectedActor, and _selectedMapper.
|
slot |
Removes the highlight actor from the visible scene.
Definition at line 109 of file VtkCustomInteractorStyle.cpp.
References _selectedActor.
|
signal |
Emitted when something was picked.
Referenced by OnLeftButtonDown(), and OnRightButtonDown().
|
slot |
Definition at line 117 of file VtkCustomInteractorStyle.cpp.
References _highlightActor.
Referenced by VisualizationWidget::on_highlightToolButton_toggled().
VtkCustomInteractorStyle::vtkTypeMacro | ( | VtkCustomInteractorStyle | , |
vtkInteractorStyleTrackballCamera | ) |
|
private |
Definition at line 84 of file VtkCustomInteractorStyle.h.
Referenced by OnKeyDown(), OnKeyUp(), OnLeftButtonDown(), and OnRightButtonDown().
|
protected |
The vtk object to pick.
Definition at line 74 of file VtkCustomInteractorStyle.h.
Referenced by OnLeftButtonDown(), OnRightButtonDown(), and pickableDataObject().
|
private |
Definition at line 83 of file VtkCustomInteractorStyle.h.
Referenced by highlightActor(), and setHighlightActor().
|
protected |
The actor for highlighting the selected cell.
Definition at line 80 of file VtkCustomInteractorStyle.h.
Referenced by VtkCustomInteractorStyle(), ~VtkCustomInteractorStyle(), OnLeftButtonDown(), pickableDataObject(), and removeHighlightActor().
|
protected |
The mapper for highlighting the selected cell.
Definition at line 77 of file VtkCustomInteractorStyle.h.
Referenced by VtkCustomInteractorStyle(), ~VtkCustomInteractorStyle(), OnLeftButtonDown(), and pickableDataObject().