VTK  9.7.1
vtkImplicitFrustumWidget.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
3 
44 #ifndef vtkImplicitFrustumWidget_h
45 #define vtkImplicitFrustumWidget_h
46 
47 #include "vtkAbstractWidget.h"
48 #include "vtkInteractionWidgetsModule.h" // For export macro
49 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
50 
51 VTK_ABI_NAMESPACE_BEGIN
53 
54 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitFrustumWidget
55  : public vtkAbstractWidget
56 {
57 public:
58  static vtkImplicitFrustumWidget* New();
60 
66  void SetRepresentation(vtkImplicitFrustumRepresentation* rep);
67 
72  {
73  return reinterpret_cast<vtkImplicitFrustumRepresentation*>(this->WidgetRep);
74  }
75 
79  void CreateDefaultRepresentation() override;
80 
81 private:
82  enum class WidgetStateType
83  {
84  Idle,
85  Active
86  };
87 
89  ~vtkImplicitFrustumWidget() override = default;
90 
92  void operator=(const vtkImplicitFrustumWidget&) = delete;
93 
95 
98  static void SelectAction(vtkAbstractWidget* widget);
99  static void EndSelectAction(vtkAbstractWidget* widget);
100  static void TranslateAction(vtkAbstractWidget* widget);
101  static void MoveAction(vtkAbstractWidget* widget);
102  static void TranslationAxisLock(vtkAbstractWidget* widget);
103  static void TranslationAxisUnLock(vtkAbstractWidget* widget);
105 
110  bool UpdateCursorShape(int interactionState);
111 
112  WidgetStateType State = WidgetStateType::Idle;
113 };
114 
115 VTK_ABI_NAMESPACE_END
116 #endif
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation * WidgetRep
3D widget for manipulating an infinite frustum
define the API for widget / widget representation
The representation for a vtkImplicitFrustumWidget.
vtkImplicitFrustumRepresentation * GetFrustumRepresentation()
Return the representation as a vtkImplicitFrustumRepresentation.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...