VTK  9.3.0
vtkCursor2D.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
31 #ifndef vtkCursor2D_h
32 #define vtkCursor2D_h
33 
34 #include "vtkFiltersGeneralModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class VTKFILTERSGENERAL_EXPORT vtkCursor2D : public vtkPolyDataAlgorithm
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
48  static vtkCursor2D* New();
49 
51 
55  void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
56  void SetModelBounds(const double bounds[6]);
57  vtkGetVectorMacro(ModelBounds, double, 6);
59 
61 
69  void SetFocalPoint(double x[3]);
70  void SetFocalPoint(double x, double y, double z)
71  {
72  double xyz[3];
73  xyz[0] = x;
74  xyz[1] = y;
75  xyz[2] = z;
76  this->SetFocalPoint(xyz);
77  }
78  vtkGetVectorMacro(FocalPoint, double, 3);
80 
82 
85  vtkSetMacro(Outline, vtkTypeBool);
86  vtkGetMacro(Outline, vtkTypeBool);
87  vtkBooleanMacro(Outline, vtkTypeBool);
89 
91 
94  vtkSetMacro(Axes, vtkTypeBool);
95  vtkGetMacro(Axes, vtkTypeBool);
96  vtkBooleanMacro(Axes, vtkTypeBool);
98 
100 
104  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
105  vtkGetMacro(Radius, double);
107 
109 
112  vtkSetMacro(Point, vtkTypeBool);
113  vtkGetMacro(Point, vtkTypeBool);
114  vtkBooleanMacro(Point, vtkTypeBool);
116 
118 
123  vtkSetMacro(TranslationMode, vtkTypeBool);
124  vtkGetMacro(TranslationMode, vtkTypeBool);
125  vtkBooleanMacro(TranslationMode, vtkTypeBool);
127 
129 
134  vtkSetMacro(Wrap, vtkTypeBool);
135  vtkGetMacro(Wrap, vtkTypeBool);
136  vtkBooleanMacro(Wrap, vtkTypeBool);
138 
140 
143  void AllOn();
144  void AllOff();
146 
147 protected:
149  ~vtkCursor2D() override = default;
150 
152 
153  double ModelBounds[6];
154  double FocalPoint[3];
158  double Radius;
161 
162 private:
163  vtkCursor2D(const vtkCursor2D&) = delete;
164  void operator=(const vtkCursor2D&) = delete;
165 };
166 
167 VTK_ABI_NAMESPACE_END
168 #endif
generate a 2D cursor representation
Definition: vtkCursor2D.h:39
double Radius
Definition: vtkCursor2D.h:158
vtkTypeBool TranslationMode
Definition: vtkCursor2D.h:159
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool Point
Definition: vtkCursor2D.h:157
vtkTypeBool Wrap
Definition: vtkCursor2D.h:160
~vtkCursor2D() override=default
vtkTypeBool Axes
Definition: vtkCursor2D.h:156
void SetFocalPoint(double x, double y, double z)
Set/Get the position of cursor focus.
Definition: vtkCursor2D.h:70
void AllOn()
Turn every part of the cursor on or off.
void SetFocalPoint(double x[3])
Set/Get the position of cursor focus.
void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Set / get the bounding box of the 2D cursor.
static vtkCursor2D * New()
Construct with model bounds = (-10,10,-10,10), focal point = (0,0), radius=2, all parts of cursor vis...
void AllOff()
Turn every part of the cursor on or off.
vtkTypeBool Outline
Definition: vtkCursor2D.h:155
void SetModelBounds(const double bounds[6])
Set / get the bounding box of the 2D cursor.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FLOAT_MAX
Definition: vtkType.h:152