#include <VTKViewer_InteractorStyle.h>

Public Member Functions | |
| vtkTypeMacro (VTKViewer_InteractorStyle, vtkInteractorStyle) | |
| virtual void | SetInteractor (vtkRenderWindowInteractor *theInteractor) |
| void | setViewWnd (VTKViewer_ViewWindow *theViewWnd) |
| void | setGUIWindow (QWidget *theWindow) |
| void | setTriedron (VTKViewer_Trihedron *theTrihedron) |
| void | setPreselectionProp (const double &theRed=0, const double &theGreen=1, const double &theBlue=1, const int &theWidth=5) |
| void | OnMouseMove (int ctrl, int shift, int x, int y) |
| void | OnLeftButtonDown (int ctrl, int shift, int x, int y) |
| void | OnLeftButtonUp (int ctrl, int shift, int x, int y) |
| void | OnMiddleButtonDown (int ctrl, int shift, int x, int y) |
| void | OnMiddleButtonUp (int ctrl, int shift, int x, int y) |
| void | OnRightButtonDown (int ctrl, int shift, int x, int y) |
| void | OnRightButtonUp (int ctrl, int shift, int x, int y) |
| void | OnSelectionModeChanged () |
| void | ViewFitAll () |
| void | SetFilter (const Handle(VTKViewer_Filter)&) |
| Handle (VTKViewer_Filter) GetFilter(const int) | |
| bool | IsFilterPresent (const int) |
| void | RemoveFilter (const int) |
| bool | IsValid (VTKViewer_Actor *theActor, const int theId, const bool theIsNode=false) |
| void | IncrementalPan (const int incrX, const int incrY) |
| void | IncrementalZoom (const int incr) |
| void | IncrementalRotate (const int incrX, const int incrY) |
| int | CurrentState () const |
| bool | eventFilter (QObject *object, QEvent *event) |
| void | startZoom () |
| void | startPan () |
| void | startGlobalPan () |
| void | startRotate () |
| void | startFitArea () |
| void | startSpin () |
| void | SetTDxStyle (vtkTDxInteractorStyle *tdxStyle) |
| bool | needsRedrawing () |
Static Public Member Functions | |
| static VTKViewer_InteractorStyle * | New () |
Protected Member Functions | |
| VTKViewer_InteractorStyle () | |
| ~VTKViewer_InteractorStyle () | |
| VTKViewer_InteractorStyle (const VTKViewer_InteractorStyle &) | |
| void | operator= (const VTKViewer_InteractorStyle &) |
| void | RotateXY (int dx, int dy) |
| void | PanXY (int x, int y, int oldX, int oldY) |
| void | DollyXY (int dx, int dy) |
| void | SpinXY (int dx, int dy, int oldX, int oldY) |
| void | fitRect (const int left, const int top, const int right, const int bottom) |
| void | Place (const int theX, const int theY) |
| void | TranslateView (int toX, int toY, int fromX, int fromY) |
| bool | IsInRect (vtkActor *theActor, const int left, const int top, const int right, const int bottom) |
| bool | IsInRect (vtkCell *theCell, const int left, const int top, const int right, const int bottom) |
| bool | IsInRect (vtkFloatingPointType *thePoint, const int left, const int top, const int right, const int bottom) |
| void | loadCursors () |
| void | startOperation (int operation) |
| virtual void | onStartOperation () |
| virtual void | onFinishOperation () |
| virtual void | onOperation (QPoint mousePos) |
| virtual void | onCursorMove (QPoint mousePos) |
| virtual void | setCursor (const int operation) |
| void | drawRect () |
| void | endDrawRect () |
| Delete rubber band on the end on the dragging operation. | |
Protected Attributes | |
| int | State |
| vtkFloatingPointType | MotionFactor |
| vtkFloatingPointType | RadianToDegree |
| double | myScale |
| VTKViewer_Actor * | myPreViewActor |
| VTKViewer_Actor * | myPreSelectionActor |
| VTKViewer_Actor * | mySelectedActor |
| int | myElemId |
| int | myEdgeId |
| int | myNodeId |
| QCursor | myDefCursor |
| QCursor | myPanCursor |
| QCursor | myZoomCursor |
| QCursor | myRotateCursor |
| QCursor | mySpinCursor |
| QCursor | myHandCursor |
| QCursor | myGlobalPanCursor |
| QPoint | myPoint |
| QPoint | myOtherPoint |
| bool | myCursorState |
| bool | myShiftState |
| int | ForcedState |
| VTKViewer_RenderWindowInteractor * | m_Interactor |
| VTKViewer_ViewWindow * | m_ViewWnd |
| VTKViewer_Trihedron * | m_Trihedron |
| QWidget * | myGUIWindow |
| std::map< int, Handle(VTKViewer_Filter) > | myFilters |
| QRubberBand * | myRectBand |
| selection rectangle rubber band | |
members from old version | |
| double | DeltaElevation |
| double | DeltaAzimuth |
| int | LastPos [2] |
Description:
This class must be supplied with a vtkRenderWindowInteractor wrapper or
parent. This class should not normally be instantiated by application
programmers.
| VTKViewer_InteractorStyle::VTKViewer_InteractorStyle | ( | ) | [protected] |
Constructor.
References VTKViewer_Actor.New(), and VTK_INTERACTOR_STYLE_CAMERA_NONE.
| VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle | ( | ) | [protected] |
Destructor.
| VTKViewer_InteractorStyle.VTKViewer_InteractorStyle | ( | const VTKViewer_InteractorStyle & | ) | [protected] |
| static VTKViewer_InteractorStyle* VTKViewer_InteractorStyle.New | ( | ) | [static] |
| VTKViewer_InteractorStyle.vtkTypeMacro | ( | VTKViewer_InteractorStyle | , |
| vtkInteractorStyle | |||
| ) |
| void VTKViewer_InteractorStyle::SetInteractor | ( | vtkRenderWindowInteractor * | theInteractor | ) | [virtual] |
Set render window interactor
| theInteractor | - interactor. |
| void VTKViewer_InteractorStyle::setViewWnd | ( | VTKViewer_ViewWindow * | theViewWnd | ) |
Set view window.
| theViewWnd | - SALOME VTKViewer_ViewWindow |
References VTKViewer_ViewWindow.AddActor().
| void VTKViewer_InteractorStyle::setGUIWindow | ( | QWidget * | theWindow | ) |
Set GUI window.
| theWindow | - QWidget window. |
| void VTKViewer_InteractorStyle::setTriedron | ( | VTKViewer_Trihedron * | theTrihedron | ) |
Set trihedron.
| theTrihedron | - SALOME VTKViewer_Trihedron |
| void VTKViewer_InteractorStyle::setPreselectionProp | ( | const double & | theRed = 0, |
| const double & | theGreen = 1, |
||
| const double & | theBlue = 1, |
||
| const int & | theWidth = 5 |
||
| ) |
Set preselection properties.
| theRed | - red color. |
| theGreen | - green color. |
| theBlue | - blue color. |
| theWidth | - width.. |
| void VTKViewer_InteractorStyle::OnMouseMove | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On mouse move event.
| ctrl | - CTRL (not used) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate |
| y | - y coordinate |
References VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::OnLeftButtonDown | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On Left button down event.
| ctrl | - CTRL (on/off - integer 0/1) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate |
| y | - y coordinate |
References VTK_INTERACTOR_STYLE_CAMERA_NONE, VTK_INTERACTOR_STYLE_CAMERA_SELECT, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::OnLeftButtonUp | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On left button up event.
| ctrl | - CTRL (not used) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate (not used) |
| y | - y coordinate (not used) |
References VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::OnMiddleButtonDown | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On left button up event.
| ctrl | - CTRL (on/off - integer 0/1) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate |
| y | - y coordinate |
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_PAN.
| void VTKViewer_InteractorStyle::OnMiddleButtonUp | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On middle button up event.
| ctrl | - CTRL (not used) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate (not used) |
| y | - y coordinate (not used) |
References VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::OnRightButtonDown | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On right button down event.
| ctrl | - CTRL (on/off - integer 0/1) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate |
| y | - y coordinate |
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_ROTATE.
| void VTKViewer_InteractorStyle::OnRightButtonUp | ( | int | ctrl, |
| int | shift, | ||
| int | x, | ||
| int | y | ||
| ) |
On right button up event.
| ctrl | - CTRL (not used) |
| shift | - SHIFT (on/off - integer 0/1) |
| x | - x coordinate (not used) |
| y | - y coordinate (not used) |
References VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::OnSelectionModeChanged | ( | ) |
called when selection mode changed (!put necessary initialization here!)
| void VTKViewer_InteractorStyle::ViewFitAll | ( | ) |
View fit all.
References VTKViewer_Trihedron.eOn, VTKViewer_Trihedron.eOnlyLineOn, ResetCamera(), and ResetCameraClippingRange().
| void VTKViewer_InteractorStyle::SetFilter | ( | const Handle(VTKViewer_Filter)& | theFilter | ) |
Set filter theFilter
References VTKViewer_Filter.GetId().
| VTKViewer_InteractorStyle.Handle | ( | VTKViewer_Filter | ) | const |
| bool VTKViewer_InteractorStyle::IsFilterPresent | ( | const int | theId | ) |
Checks: is filter present (with id theId)
| theId | - filter id. |
| void VTKViewer_InteractorStyle::RemoveFilter | ( | const int | theId | ) |
Remove filter with id theId.
| theId | - filter id. |
| bool VTKViewer_InteractorStyle::IsValid | ( | VTKViewer_Actor * | theActor, |
| const int | theId, | ||
| const bool | theIsNode = false |
||
| ) |
Checks: is valid cell(node) with id theId in actor theActor.
| theActor | - VTKViewer_Actor pointer. |
| theId | - cell id. |
| theIsNode | - boolean flag, if true - node, else - cell. |
References Handle().
| void VTKViewer_InteractorStyle::IncrementalPan | ( | const int | incrX, |
| const int | incrY | ||
| ) |
Increment pan.
| incrX | - X coordinate increment. |
| incrY | - Y coordinate increment. |
| void VTKViewer_InteractorStyle::IncrementalZoom | ( | const int | incr | ) |
Increment zoom.
| incr | - zoom increment. |
| void VTKViewer_InteractorStyle::IncrementalRotate | ( | const int | incrX, |
| const int | incrY | ||
| ) |
Increment rotate.
| incrX | - X coordinate increment. |
| incrY | - Y coordinate increment. |
| int VTKViewer_InteractorStyle.CurrentState | ( | ) | const |
| void VTKViewer_InteractorStyle.operator= | ( | const VTKViewer_InteractorStyle & | ) | [protected] |
| void VTKViewer_InteractorStyle::RotateXY | ( | int | dx, |
| int | dy | ||
| ) | [protected] |
| void VTKViewer_InteractorStyle::PanXY | ( | int | x, |
| int | y, | ||
| int | oldX, | ||
| int | oldY | ||
| ) | [protected] |
| void VTKViewer_InteractorStyle::DollyXY | ( | int | dx, |
| int | dy | ||
| ) | [protected] |
Move the position of the camera along the direction of projection. (dx,dy)
References ResetCameraClippingRange().
| void VTKViewer_InteractorStyle::SpinXY | ( | int | dx, |
| int | dy, | ||
| int | oldX, | ||
| int | oldY | ||
| ) | [protected] |
| void VTKViewer_InteractorStyle::fitRect | ( | const int | left, |
| const int | top, | ||
| const int | right, | ||
| const int | bottom | ||
| ) | [protected] |
fits viewer contents to rectangle
| left | - left side |
| top | - top side |
| right | - right side |
| bottom | - bottom side |
References ResetCameraClippingRange().
| void VTKViewer_InteractorStyle::Place | ( | const int | theX, |
| const int | theY | ||
| ) | [protected] |
called on finsh GlobalPan operation
References ResetCameraClippingRange().
| void VTKViewer_InteractorStyle::TranslateView | ( | int | toX, |
| int | toY, | ||
| int | fromX, | ||
| int | fromY | ||
| ) | [protected] |
Translates view from Point to Point
| bool VTKViewer_InteractorStyle::IsInRect | ( | vtkActor * | theActor, |
| const int | left, | ||
| const int | top, | ||
| const int | right, | ||
| const int | bottom | ||
| ) | [protected] |
Checks: is the given Actor within display coordinates?
| bool VTKViewer_InteractorStyle::IsInRect | ( | vtkCell * | theCell, |
| const int | left, | ||
| const int | top, | ||
| const int | right, | ||
| const int | bottom | ||
| ) | [protected] |
Checks: is the given Cell within display coordinates?
| bool VTKViewer_InteractorStyle::IsInRect | ( | vtkFloatingPointType * | thePoint, |
| const int | left, | ||
| const int | top, | ||
| const int | right, | ||
| const int | bottom | ||
| ) | [protected] |
Checks: is given point thePoint in rectangle
event filter - controls mouse and keyboard events during viewer operations
References VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::startZoom | ( | ) |
starts Zoom operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::startPan | ( | ) |
starts Pan operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_PAN.
| void VTKViewer_InteractorStyle::startGlobalPan | ( | ) |
starts Global Panning operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_GLOBAL_PAN, and VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::startRotate | ( | ) |
starts Rotate operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_ROTATE.
| void VTKViewer_InteractorStyle::startFitArea | ( | ) |
starts Fit Area operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_FIT, and VTK_INTERACTOR_STYLE_CAMERA_NONE.
| void VTKViewer_InteractorStyle::startSpin | ( | ) |
starts Spin operation (e.g. through menu command)
References VTK_INTERACTOR_STYLE_CAMERA_NONE, and VTK_INTERACTOR_STYLE_CAMERA_SPIN.
| void VTKViewer_InteractorStyle.SetTDxStyle | ( | vtkTDxInteractorStyle * | tdxStyle | ) |
| bool VTKViewer_InteractorStyle::needsRedrawing | ( | ) |
| TRUE | if needs redrawing |
References VTK_INTERACTOR_STYLE_CAMERA_NONE, VTK_INTERACTOR_STYLE_CAMERA_PAN, VTK_INTERACTOR_STYLE_CAMERA_ROTATE, VTK_INTERACTOR_STYLE_CAMERA_SPIN, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::loadCursors | ( | ) | [protected] |
Loads cursors for viewer operations - zoom, pan, etc...
References imageRotateCursor, and imageZoomCursor.
| void VTKViewer_InteractorStyle::startOperation | ( | int | operation | ) | [protected] |
starts viewer operation (!internal usage!)
References VTK_INTERACTOR_STYLE_CAMERA_FIT, VTK_INTERACTOR_STYLE_CAMERA_GLOBAL_PAN, VTK_INTERACTOR_STYLE_CAMERA_NONE, VTK_INTERACTOR_STYLE_CAMERA_PAN, VTK_INTERACTOR_STYLE_CAMERA_ROTATE, VTK_INTERACTOR_STYLE_CAMERA_SELECT, VTK_INTERACTOR_STYLE_CAMERA_SPIN, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::onStartOperation | ( | ) | [protected, virtual] |
called when viewer operation started (!put necessary initialization here!)
References VTK_INTERACTOR_STYLE_CAMERA_FIT, VTK_INTERACTOR_STYLE_CAMERA_GLOBAL_PAN, VTK_INTERACTOR_STYLE_CAMERA_PAN, VTK_INTERACTOR_STYLE_CAMERA_ROTATE, VTK_INTERACTOR_STYLE_CAMERA_SELECT, VTK_INTERACTOR_STYLE_CAMERA_SPIN, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::onFinishOperation | ( | ) | [protected, virtual] |
called when viewer operation finished (!put necessary post-processing here!)
| void VTKViewer_InteractorStyle::onOperation | ( | QPoint | mousePos | ) | [protected, virtual] |
called during viewer operation when user moves mouse (!put necessary processing here!)
References VTK_INTERACTOR_STYLE_CAMERA_FIT, VTK_INTERACTOR_STYLE_CAMERA_GLOBAL_PAN, VTK_INTERACTOR_STYLE_CAMERA_PAN, VTK_INTERACTOR_STYLE_CAMERA_ROTATE, VTK_INTERACTOR_STYLE_CAMERA_SELECT, VTK_INTERACTOR_STYLE_CAMERA_SPIN, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::onCursorMove | ( | QPoint | mousePos | ) | [protected, virtual] |
called when user moves mouse inside viewer window and there is no active viewer operation
(!put necessary processing here!)
| void VTKViewer_InteractorStyle::setCursor | ( | const int | operation | ) | [protected, virtual] |
sets proper cursor for window when viewer operation is activated
References VTK_INTERACTOR_STYLE_CAMERA_FIT, VTK_INTERACTOR_STYLE_CAMERA_GLOBAL_PAN, VTK_INTERACTOR_STYLE_CAMERA_NONE, VTK_INTERACTOR_STYLE_CAMERA_PAN, VTK_INTERACTOR_STYLE_CAMERA_ROTATE, VTK_INTERACTOR_STYLE_CAMERA_SELECT, VTK_INTERACTOR_STYLE_CAMERA_SPIN, and VTK_INTERACTOR_STYLE_CAMERA_ZOOM.
| void VTKViewer_InteractorStyle::drawRect | ( | ) | [protected] |
Draws rectangle by starting and current points
References Plot2d.Rectangle.
| void VTKViewer_InteractorStyle::endDrawRect | ( | ) | [protected] |
int VTKViewer_InteractorStyle.State [protected] |
double VTKViewer_InteractorStyle.myScale [protected] |
VTKViewer_Actor* VTKViewer_InteractorStyle.myPreViewActor [protected] |
VTKViewer_Actor * VTKViewer_InteractorStyle.myPreSelectionActor [protected] |
VTKViewer_Actor * VTKViewer_InteractorStyle.mySelectedActor [protected] |
int VTKViewer_InteractorStyle.myElemId [protected] |
int VTKViewer_InteractorStyle.myEdgeId [protected] |
int VTKViewer_InteractorStyle.myNodeId [protected] |
QCursor VTKViewer_InteractorStyle.myDefCursor [protected] |
QCursor VTKViewer_InteractorStyle.myPanCursor [protected] |
QCursor VTKViewer_InteractorStyle.myZoomCursor [protected] |
QCursor VTKViewer_InteractorStyle.myRotateCursor [protected] |
QCursor VTKViewer_InteractorStyle.mySpinCursor [protected] |
QCursor VTKViewer_InteractorStyle.myHandCursor [protected] |
QCursor VTKViewer_InteractorStyle.myGlobalPanCursor [protected] |
QPoint VTKViewer_InteractorStyle.myPoint [protected] |
QPoint VTKViewer_InteractorStyle.myOtherPoint [protected] |
bool VTKViewer_InteractorStyle.myCursorState [protected] |
bool VTKViewer_InteractorStyle.myShiftState [protected] |
int VTKViewer_InteractorStyle.ForcedState [protected] |
VTKViewer_ViewWindow* VTKViewer_InteractorStyle.m_ViewWnd [protected] |
VTKViewer_Trihedron* VTKViewer_InteractorStyle.m_Trihedron [protected] |
QWidget* VTKViewer_InteractorStyle.myGUIWindow [protected] |
std::map<int, Handle(VTKViewer_Filter) > VTKViewer_InteractorStyle.myFilters [protected] |
QRubberBand* VTKViewer_InteractorStyle.myRectBand [protected] |
double VTKViewer_InteractorStyle.DeltaElevation [protected] |
double VTKViewer_InteractorStyle.DeltaAzimuth [protected] |
int VTKViewer_InteractorStyle.LastPos[2] [protected] |