vtkPVAxesWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkPVAxesWidget_h
18 #define vtkPVAxesWidget_h
19 
20 #include "vtkInteractorObserver.h"
21 #include "vtkRemotingViewsModule.h" // needed for export macro
22 
23 class vtkActor2D;
24 class vtkKWApplication;
25 class vtkPolyData;
26 class vtkPVAxesActor;
27 class vtkRenderer;
28 
30 {
31 public:
32  static vtkPVAxesWidget* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
39  static const int RendererLayer = 1;
40 
42 
45  void SetAxesActor(vtkPVAxesActor* actor);
46  vtkGetObjectMacro(AxesActor, vtkPVAxesActor);
48 
50 
53  void SetParentRenderer(vtkRenderer* ren);
54  vtkRenderer* GetParentRenderer();
56 
60  void SetInteractor(vtkRenderWindowInteractor* iren) override;
61 
65  vtkGetObjectMacro(Renderer, vtkRenderer);
66 
71  void SetEnabled(int) override;
72 
74 
78  void SetVisibility(bool val);
79  bool GetVisibility();
81 
83 
87  void SetOutlineColor(double r, double g, double b);
88  double* GetOutlineColor();
90 
92 
95  void SetAxisLabelColor(double r, double g, double b);
96  double* GetAxisLabelColor();
98 
100 
103  void SetViewport(double minX, double minY, double maxX, double maxY);
104  double* GetViewport();
106 
108 
111  void SetXAxisColor(double r, double g, double b);
112  void SetYAxisColor(double r, double g, double b);
113  void SetZAxisColor(double r, double g, double b);
114 
115  void SetXAxisVisibility(bool vis);
116  void SetYAxisVisibility(bool vis);
117  void SetZAxisVisibility(bool vis);
118 
119  void SetXAxisLabelText(const char* text);
120  void SetYAxisLabelText(const char* text);
121  void SetZAxisLabelText(const char* text);
123 
124 protected:
125  vtkPVAxesWidget();
126  ~vtkPVAxesWidget() override;
127 
130 
134 
135  static void ProcessEvents(
136  vtkObject* object, unsigned long event, void* clientdata, void* calldata);
137 
142  void UpdateCameraFromParentRenderer();
143 
145  int Moving;
146  int StartPosition[2];
147 
148  void UpdateCursorIcon();
149  void SetMouseCursor(int cursorState);
150 
152  {
153  Outside = 0,
158  BottomRight
159  };
160 
161  void OnButtonPress();
162  void OnMouseMove();
163  void OnButtonRelease();
164  void MoveWidget();
165  void ResizeTopLeft();
166  void ResizeTopRight();
167  void ResizeBottomLeft();
168  void ResizeBottomRight();
169  void SquareRenderer();
170 
171  unsigned long StartEventObserverId;
172 
173 private:
174  vtkPVAxesWidget(const vtkPVAxesWidget&) = delete;
175  void operator=(const vtkPVAxesWidget&) = delete;
176 };
177 
178 #endif
virtual void SetInteractor(vtkRenderWindowInteractor *iren)
unsigned long StartEventObserverId
vtkRenderer * Renderer
#define VTKREMOTINGVIEWS_EXPORT
static void ProcessEvents(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
virtual void SetEnabled(int)
vtkPVAxesActor * AxesActor
a 3D axes representation
vtkActor2D * OutlineActor
A widget to manipulate vtkPVAxesWidget.
vtkPolyData * Outline
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
vtkRenderer * ParentRenderer
void operator=(const vtkObjectBase &)