![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
vtkCustomInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications. Besides defining the rendering style, we also create a list of custom actions that are triggered on different keys being pressed: More...
#include <vtkCustomInteractorStyle.h>


Public Member Functions | |
| vtkTypeMacro (vtkCustomInteractorStyle, pcl::visualization::PCLVisualizerInteractorStyle) | |
| void | PrintSelf (ostream &os, vtkIndent indent) override |
| vtkCustomInteractorStyle () | |
| Empty constructor. More... | |
| virtual | ~vtkCustomInteractorStyle () override |
| Empty destructor. More... | |
| void | toggleAreaPicking () |
| void | setRenderWindow (const vtkSmartPointer< vtkRenderWindow > &win) |
| Set render window. More... | |
| void | AddManipulator (vtkCameraManipulator *m) |
| void | RemoveAllManipulators () |
| vtkGetObjectMacro (CameraManipulators, vtkCollection) | |
| vtkSetVector3Macro (CenterOfRotation, double) | |
| vtkGetVector3Macro (CenterOfRotation, double) | |
| vtkSetMacro (RotationFactor, double) | |
| vtkGetMacro (RotationFactor, double) | |
| virtual vtkCameraManipulator * | FindManipulator (int button, int shift, int control) |
Static Public Member Functions | |
| static vtkCustomInteractorStyle * | New () |
| static void | DollyToPosition (double fact, int *position, vtkRenderer *renderer) |
| static void | TranslateCamera (vtkRenderer *renderer, int toX, int toY, int fromX, int fromY) |
Protected Member Functions | |
| void | zoomIn () |
| Interactor style internal method. Zoom in. More... | |
| void | zoomOut () |
| Interactor style internal method. Zoom out. More... | |
| virtual void | OnKeyDown () override |
| virtual void | OnKeyUp () override |
| virtual void | OnChar () override |
| Interactor style internal method. Gets called whenever a key is pressed. More... | |
| virtual void | OnMouseMove () override |
| virtual void | OnLeftButtonDown () override |
| virtual void | OnLeftButtonUp () override |
| virtual void | OnMiddleButtonDown () override |
| virtual void | OnMiddleButtonUp () override |
| virtual void | OnRightButtonDown () override |
| virtual void | OnRightButtonUp () override |
| virtual void | OnMouseWheelForward () override |
| virtual void | OnMouseWheelBackward () override |
| void | Dolly (double factor) override |
| void | updateLookUpTableDisplay (bool add_lut=false) |
| Add/remove the look up table displayed when 'u' is pressed, can also be used to update the current LUT displayed lut_actor_id_ is used (if not empty) to chose which cloud/shape actor LUT will be updated (depending on what is available) If lut_actor_id_ is empty the first actor with LUT support found will be used. More... | |
| void | OnButtonDown (int button, int shift, int control) |
| void | OnButtonUp (int button) |
| void | ResetLights () |
| vtkCustomInteractorStyle (const vtkCustomInteractorStyle &)=delete | |
| void | operator= (const vtkCustomInteractorStyle &)=delete |
Protected Attributes | |
| std::string | lut_actor_id_ |
| ID used to fetch/display the look up table on the visualizer It should be set by PCLVisualizer setLookUpTableID. More... | |
| vtkCameraManipulator * | CurrentManipulator |
| double | CenterOfRotation [3] |
| double | RotationFactor |
| vtkCollection * | CameraManipulators |
vtkCustomInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications. Besides defining the rendering style, we also create a list of custom actions that are triggered on different keys being pressed:
Definition at line 57 of file vtkCustomInteractorStyle.h.
| VTKExtensions::vtkCustomInteractorStyle::vtkCustomInteractorStyle | ( | ) |
Empty constructor.
Definition at line 64 of file vtkCustomInteractorStyle.cpp.
References CenterOfRotation.
|
overridevirtual |
Empty destructor.
Definition at line 75 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators.
|
protecteddelete |
| void VTKExtensions::vtkCustomInteractorStyle::AddManipulator | ( | vtkCameraManipulator * | m | ) |
Access to adding or removing manipulators.
Definition at line 86 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators.
Referenced by PclUtils::PCLVis::setCameraManipulators().
|
overrideprotected |
Definition at line 1291 of file vtkCustomInteractorStyle.cpp.
References DollyToPosition().
|
static |
Dolly the renderer's camera to a specific point
Definition at line 1302 of file vtkCustomInteractorStyle.cpp.
References position, and TranslateCamera().
Referenced by Dolly().
|
virtual |
Returns the chosen manipulator based on the modifiers.
Definition at line 1274 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators, and NULL.
Referenced by OnButtonDown().
|
static |
|
protected |
Definition at line 1226 of file vtkCustomInteractorStyle.cpp.
References CenterOfRotation, CurrentManipulator, FindManipulator(), NULL, vtkCameraManipulator::OnButtonDown(), RotationFactor, and vtkCameraManipulator::StartInteraction().
Referenced by OnLeftButtonDown(), OnMiddleButtonDown(), and OnRightButtonDown().
|
protected |
Definition at line 1257 of file vtkCustomInteractorStyle.cpp.
References CurrentManipulator, vtkCameraManipulator::EndInteraction(), NULL, and vtkCameraManipulator::OnButtonUp().
Referenced by OnLeftButtonUp(), OnMiddleButtonUp(), and OnRightButtonUp().
|
overrideprotectedvirtual |
Interactor style internal method. Gets called whenever a key is pressed.
Definition at line 128 of file vtkCustomInteractorStyle.cpp.
|
overrideprotectedvirtual |
Definition at line 207 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators, data, QtCompat::endl(), CVLog::Error(), event, cloudViewer::utility::filesystem::FileExists(), NULL, vtkCameraManipulator::OnKeyDown(), ORIENT_MODE, cloudViewer::t::geometry::path, points, CVLog::Print(), SELECT_MODE, updateLookUpTableDisplay(), zoomIn(), and zoomOut().
|
overrideprotectedvirtual |
Definition at line 966 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators, event, NULL, and vtkCameraManipulator::OnKeyUp().
|
overrideprotectedvirtual |
Definition at line 1019 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonDown(), x, and y.
|
overrideprotectedvirtual |
Definition at line 1046 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonUp(), x, and y.
|
overrideprotectedvirtual |
Definition at line 1061 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonDown(), x, and y.
|
overrideprotectedvirtual |
Definition at line 1087 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonUp(), x, and y.
|
overrideprotectedvirtual |
Definition at line 985 of file vtkCustomInteractorStyle.cpp.
References CurrentManipulator, event, vtkCameraManipulator::OnMouseMove(), VTKISRBP_SELECT, x, and y.
|
overrideprotectedvirtual |
Definition at line 1175 of file vtkCustomInteractorStyle.cpp.
|
overrideprotectedvirtual |
Definition at line 1144 of file vtkCustomInteractorStyle.cpp.
|
overrideprotectedvirtual |
Definition at line 1102 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonDown(), x, and y.
|
overrideprotectedvirtual |
Definition at line 1129 of file vtkCustomInteractorStyle.cpp.
References event, OnButtonUp(), x, and y.
|
protecteddelete |
|
override |
Definition at line 1526 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators, CenterOfRotation, QtCompat::endl(), and RotationFactor.
| void VTKExtensions::vtkCustomInteractorStyle::RemoveAllManipulators | ( | ) |
Removes all manipulators.
Definition at line 81 of file vtkCustomInteractorStyle.cpp.
References CameraManipulators.
Referenced by PclUtils::PCLVis::setCameraManipulators().
|
protected |
Definition at line 1206 of file vtkCustomInteractorStyle.cpp.
References ecvColor::light().
|
inline |
Set render window.
Definition at line 76 of file vtkCustomInteractorStyle.h.
| void VTKExtensions::vtkCustomInteractorStyle::toggleAreaPicking | ( | ) |
Definition at line 112 of file vtkCustomInteractorStyle.cpp.
References ORIENT_MODE, and SELECT_MODE.
|
static |
Translate the renderer's camera
Definition at line 1356 of file vtkCustomInteractorStyle.cpp.
Referenced by DollyToPosition().
|
protected |
Add/remove the look up table displayed when 'u' is pressed, can also be used to update the current LUT displayed lut_actor_id_ is used (if not empty) to chose which cloud/shape actor LUT will be updated (depending on what is available) If lut_actor_id_ is empty the first actor with LUT support found will be used.
Definition at line 1390 of file vtkCustomInteractorStyle.cpp.
References lut_actor_id_.
Referenced by OnKeyDown().
| VTKExtensions::vtkCustomInteractorStyle::vtkGetMacro | ( | RotationFactor | , |
| double | |||
| ) |
| VTKExtensions::vtkCustomInteractorStyle::vtkGetObjectMacro | ( | CameraManipulators | , |
| vtkCollection | |||
| ) |
Accessor for the collection of camera manipulators.
| VTKExtensions::vtkCustomInteractorStyle::vtkGetVector3Macro | ( | CenterOfRotation | , |
| double | |||
| ) |
| VTKExtensions::vtkCustomInteractorStyle::vtkSetMacro | ( | RotationFactor | , |
| double | |||
| ) |
Propagates the rotation factor to the manipulators. This simply sets an internal ivar. It is propagated to a manipulator before the event is sent to it. Also changing the RotationFactor during interaction i.e. after a button press but before a button up has no effect until the next button press.
| VTKExtensions::vtkCustomInteractorStyle::vtkSetVector3Macro | ( | CenterOfRotation | , |
| double | |||
| ) |
Propagates the center to the manipulators. This simply sets an internal ivar. It is propagated to a manipulator before the event is sent to it. Also changing the CenterOfRotation during interaction i.e. after a button press but before a button up has no effect until the next button press.
| VTKExtensions::vtkCustomInteractorStyle::vtkTypeMacro | ( | vtkCustomInteractorStyle | , |
| pcl::visualization::PCLVisualizerInteractorStyle | |||
| ) |
|
protected |
Interactor style internal method. Zoom in.
Definition at line 91 of file vtkCustomInteractorStyle.cpp.
References Dolly().
Referenced by OnChar(), and OnKeyDown().
|
protected |
Interactor style internal method. Zoom out.
Definition at line 102 of file vtkCustomInteractorStyle.cpp.
References Dolly().
Referenced by OnChar(), and OnKeyDown().
|
protected |
Definition at line 196 of file vtkCustomInteractorStyle.h.
Referenced by AddManipulator(), FindManipulator(), OnKeyDown(), OnKeyUp(), PrintSelf(), RemoveAllManipulators(), and ~vtkCustomInteractorStyle().
|
protected |
Definition at line 192 of file vtkCustomInteractorStyle.h.
Referenced by OnButtonDown(), PrintSelf(), and vtkCustomInteractorStyle().
|
protected |
Definition at line 191 of file vtkCustomInteractorStyle.h.
Referenced by OnButtonDown(), OnButtonUp(), and OnMouseMove().
|
protected |
ID used to fetch/display the look up table on the visualizer It should be set by PCLVisualizer setLookUpTableID.
Definition at line 182 of file vtkCustomInteractorStyle.h.
Referenced by updateLookUpTableDisplay().
|
protected |
Definition at line 193 of file vtkCustomInteractorStyle.h.
Referenced by OnButtonDown(), and PrintSelf().