VTK
vtkImplicitCylinderWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitCylinderWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
88 #ifndef vtkImplicitCylinderWidget_h
89 #define vtkImplicitCylinderWidget_h
90 
91 #include "vtkInteractionWidgetsModule.h" // For export macro
92 #include "vtkAbstractWidget.h"
93 
95 
96 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitCylinderWidget : public vtkAbstractWidget
97 {
98 public:
102  static vtkImplicitCylinderWidget *New();
103 
105 
109  void PrintSelf(ostream& os, vtkIndent indent) override;
111 
117  void SetRepresentation( vtkImplicitCylinderRepresentation *rep );
118 
119  // Description:
120  // Disable/Enable the widget if needed.
121  // Unobserved the camera if the widget is disabled.
122  void SetEnabled(int enabling) override;
123 
128  {return reinterpret_cast<vtkImplicitCylinderRepresentation*>(this->WidgetRep);}
129 
133  void CreateDefaultRepresentation() override;
134 
135 protected:
137  ~vtkImplicitCylinderWidget() override;
138 
139  // Manage the state of the widget
141  enum _WidgetState {Start=0,Active};
142 
143  // These methods handle events
144  static void SelectAction(vtkAbstractWidget*);
145  static void TranslateAction(vtkAbstractWidget*);
146  static void ScaleAction(vtkAbstractWidget*);
147  static void EndSelectAction(vtkAbstractWidget*);
148  static void MoveAction(vtkAbstractWidget*);
149  static void MoveCylinderAction(vtkAbstractWidget*);
150 
155  int UpdateCursorShape( int interactionState );
156 
157 private:
159  void operator=(const vtkImplicitCylinderWidget&) = delete;
160 };
161 
162 #endif
vtkImplicitCylinderWidget::WidgetState
int WidgetState
Definition: vtkImplicitCylinderWidget.h:140
vtkImplicitCylinderRepresentation
defining the representation for a vtkImplicitCylinderWidget
Definition: vtkImplicitCylinderRepresentation.h:65
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkAbstractWidget::CreateDefaultRepresentation
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkImplicitCylinderWidget::GetCylinderRepresentation
vtkImplicitCylinderRepresentation * GetCylinderRepresentation()
Return the representation as a vtkImplicitCylinderRepresentation.
Definition: vtkImplicitCylinderWidget.h:127
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImplicitCylinderWidget
3D widget for manipulating an infinite cylinder
Definition: vtkImplicitCylinderWidget.h:96
vtkAbstractWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.
vtkImplicitCylinderWidget::_WidgetState
_WidgetState
Definition: vtkImplicitCylinderWidget.h:141