VTK  9.4.20251007
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
82
83#ifndef vtkImplicitConeWidget_h
84#define vtkImplicitConeWidget_h
85
86#include "vtkAbstractWidget.h"
87#include "vtkInteractionWidgetsModule.h" // For export macro
88#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
89
90VTK_ABI_NAMESPACE_BEGIN
92
93class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitConeWidget : public vtkAbstractWidget
94{
95public:
96 static vtkImplicitConeWidget* New();
97 vtkTypeMacro(vtkImplicitConeWidget, vtkAbstractWidget);
98
105
113
118
119private:
120 vtkImplicitConeWidget();
121 ~vtkImplicitConeWidget() override = default;
122
123 enum WidgetStateType
124 {
125 Idle = 0,
126 Active
127 };
128
129 // Manage the state of the widget
130 WidgetStateType WidgetState = vtkImplicitConeWidget::Idle;
131
132 // These methods handle events
133 static void SelectAction(vtkAbstractWidget* widget);
134 static void TranslateAction(vtkAbstractWidget* widget);
135 static void ScaleAction(vtkAbstractWidget* widget);
136 static void EndSelectAction(vtkAbstractWidget* widget);
137 static void MoveAction(vtkAbstractWidget* widget);
138 static void MoveConeAction(vtkAbstractWidget* widget);
139 static void TranslationAxisLock(vtkAbstractWidget* widget);
140 static void TranslationAxisUnLock(vtkAbstractWidget* widget);
141
146 bool UpdateCursorShape(int interactionState);
147
149 void operator=(const vtkImplicitConeWidget&) = delete;
150};
151
152VTK_ABI_NAMESPACE_END
153#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
defining the representation for a vtkImplicitConeWidget
3D widget for manipulating an infinite cone
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRepresentation(vtkImplicitConeRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkImplicitConeRepresentation * GetConeRepresentation()
Return the representation as a vtkImplicitConeRepresentation.
static vtkImplicitConeWidget * New()
#define VTK_MARSHALAUTO