VTK  9.5.20250810
vtkImplicitAnnulusWidget.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
95#ifndef vtkImplicitAnnulusWidget_h
96#define vtkImplicitAnnulusWidget_h
97
98#include "vtkAbstractWidget.h"
99#include "vtkInteractionWidgetsModule.h" // For export macro
100#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
101
102VTK_ABI_NAMESPACE_BEGIN
104
105class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitAnnulusWidget
106 : public vtkAbstractWidget
107{
108public:
111
118
123 {
124 return reinterpret_cast<vtkImplicitAnnulusRepresentation*>(this->WidgetRep);
125 }
126
131
132private:
133 enum WidgetStateType
134 {
135 Idle = 0,
136 Active
137 };
138
140 ~vtkImplicitAnnulusWidget() override = default;
141
143 void operator=(const vtkImplicitAnnulusWidget&) = delete;
144
146
149 static void SelectAction(vtkAbstractWidget* widget);
150 static void TranslateAction(vtkAbstractWidget* widget);
151 static void ScaleAction(vtkAbstractWidget* widget);
152 static void EndSelectAction(vtkAbstractWidget* widget);
153 static void MoveAction(vtkAbstractWidget* widget);
154 static void MoveAnnulusAction(vtkAbstractWidget* widget);
155 static void TranslationAxisLock(vtkAbstractWidget* widget);
156 static void TranslationAxisUnLock(vtkAbstractWidget* widget);
158
163 bool UpdateCursorShape(int interactionState);
164
165 // Manage the state of the widget
166 WidgetStateType WidgetState = vtkImplicitAnnulusWidget::Idle;
167};
168
169VTK_ABI_NAMESPACE_END
170#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
defining the representation for a vtkImplicitAnnulusWidget
3D widget for manipulating an infinite annulus
static vtkImplicitAnnulusWidget * New()
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkImplicitAnnulusRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkImplicitAnnulusRepresentation * GetAnnulusRepresentation()
Return the representation as a vtkImplicitAnnulusRepresentation.
#define VTK_MARSHALAUTO