VTK  9.7.1
vtkCamera3DWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
56 #ifndef vtkCamera3DWidget_h
57 #define vtkCamera3DWidget_h
58 
59 #include "vtkAbstractWidget.h"
60 #include "vtkInteractionWidgetsModule.h" // For export macro
61 #include "vtkNew.h" // For vtkNew
62 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
63 
64 VTK_ABI_NAMESPACE_BEGIN
65 class vtkCamera;
67 
68 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCamera3DWidget : public vtkAbstractWidget
69 {
70 public:
74  static vtkCamera3DWidget* New();
75 
77 
82  void CreateDefaultRepresentation() override;
83 
89  void SetRepresentation(vtkCamera3DRepresentation* r);
90 
95  void SetEnabled(int enabling) override;
96 
97 protected:
99  ~vtkCamera3DWidget() override;
100 
101  bool Active = false;
103 
104  // These methods handle events
105  static void SelectAction(vtkAbstractWidget*);
106  static void EndSelectAction(vtkAbstractWidget*);
107  static void MoveAction(vtkAbstractWidget*);
108 
109  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
110 
111 private:
112  vtkCamera3DWidget(const vtkCamera3DWidget&) = delete;
113  void operator=(const vtkCamera3DWidget&) = delete;
114 };
115 
116 VTK_ABI_NAMESPACE_END
117 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
vtkNew< vtkCallbackCommand > KeyEventCallbackCommand
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
3D Widget for manipulating a vtkCamera
a class defining the representation for the vtkCamera3DWidget