VTK  9.7.1
vtkImplicitConeWidget.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 
77 #ifndef vtkImplicitConeWidget_h
78 #define vtkImplicitConeWidget_h
79 
80 #include "vtkAbstractWidget.h"
81 #include "vtkInteractionWidgetsModule.h" // For export macro
82 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
83 
84 VTK_ABI_NAMESPACE_BEGIN
86 
87 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitConeWidget : public vtkAbstractWidget
88 {
89 public:
90  static vtkImplicitConeWidget* New();
92 
98  void SetRepresentation(vtkImplicitConeRepresentation* rep);
99 
104  {
105  return reinterpret_cast<vtkImplicitConeRepresentation*>(this->WidgetRep);
106  }
107 
111  void CreateDefaultRepresentation() override;
112 
113 private:
115  ~vtkImplicitConeWidget() override = default;
116 
117  enum WidgetStateType
118  {
119  Idle = 0,
120  Active
121  };
122 
123  // Manage the state of the widget
124  WidgetStateType WidgetState = vtkImplicitConeWidget::Idle;
125 
126  // These methods handle events
127  static void SelectAction(vtkAbstractWidget* widget);
128  static void TranslateAction(vtkAbstractWidget* widget);
129  static void ScaleAction(vtkAbstractWidget* widget);
130  static void EndSelectAction(vtkAbstractWidget* widget);
131  static void MoveAction(vtkAbstractWidget* widget);
132  static void MoveConeAction(vtkAbstractWidget* widget);
133  static void TranslationAxisLock(vtkAbstractWidget* widget);
134  static void TranslationAxisUnLock(vtkAbstractWidget* widget);
135 
140  bool UpdateCursorShape(int interactionState);
141 
143  void operator=(const vtkImplicitConeWidget&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkImplicitConeRepresentation * GetConeRepresentation()
Return the representation as a vtkImplicitConeRepresentation.
vtkWidgetRepresentation * WidgetRep
define the API for widget / widget representation
#define VTK_MARSHALAUTO
defining the representation for a vtkImplicitConeWidget
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
3D widget for manipulating an infinite cone