VTK  9.2.6
vtkCursor2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCursor2D.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 =========================================================================*/
53 #ifndef vtkCursor2D_h
54 #define vtkCursor2D_h
55 
56 #include "vtkFiltersGeneralModule.h" // For export macro
57 #include "vtkPolyDataAlgorithm.h"
58 
59 class VTKFILTERSGENERAL_EXPORT vtkCursor2D : public vtkPolyDataAlgorithm
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
69  static vtkCursor2D* New();
70 
72 
76  void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
77  void SetModelBounds(const double bounds[6]);
78  vtkGetVectorMacro(ModelBounds, double, 6);
80 
82 
90  void SetFocalPoint(double x[3]);
91  void SetFocalPoint(double x, double y, double z)
92  {
93  double xyz[3];
94  xyz[0] = x;
95  xyz[1] = y;
96  xyz[2] = z;
97  this->SetFocalPoint(xyz);
98  }
99  vtkGetVectorMacro(FocalPoint, double, 3);
101 
103 
106  vtkSetMacro(Outline, vtkTypeBool);
107  vtkGetMacro(Outline, vtkTypeBool);
108  vtkBooleanMacro(Outline, vtkTypeBool);
110 
112 
115  vtkSetMacro(Axes, vtkTypeBool);
116  vtkGetMacro(Axes, vtkTypeBool);
117  vtkBooleanMacro(Axes, vtkTypeBool);
119 
121 
125  vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
126  vtkGetMacro(Radius, double);
128 
130 
133  vtkSetMacro(Point, vtkTypeBool);
134  vtkGetMacro(Point, vtkTypeBool);
135  vtkBooleanMacro(Point, vtkTypeBool);
137 
139 
144  vtkSetMacro(TranslationMode, vtkTypeBool);
145  vtkGetMacro(TranslationMode, vtkTypeBool);
146  vtkBooleanMacro(TranslationMode, vtkTypeBool);
148 
150 
155  vtkSetMacro(Wrap, vtkTypeBool);
156  vtkGetMacro(Wrap, vtkTypeBool);
157  vtkBooleanMacro(Wrap, vtkTypeBool);
159 
161 
164  void AllOn();
165  void AllOff();
167 
168 protected:
170  ~vtkCursor2D() override = default;
171 
173 
174  double ModelBounds[6];
175  double FocalPoint[3];
179  double Radius;
182 
183 private:
184  vtkCursor2D(const vtkCursor2D&) = delete;
185  void operator=(const vtkCursor2D&) = delete;
186 };
187 
188 #endif
generate a 2D cursor representation
Definition: vtkCursor2D.h:60
double Radius
Definition: vtkCursor2D.h:179
vtkTypeBool TranslationMode
Definition: vtkCursor2D.h:180
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool Point
Definition: vtkCursor2D.h:178
vtkTypeBool Wrap
Definition: vtkCursor2D.h:181
~vtkCursor2D() override=default
vtkTypeBool Axes
Definition: vtkCursor2D.h:177
void SetFocalPoint(double x, double y, double z)
Set/Get the position of cursor focus.
Definition: vtkCursor2D.h:91
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:176
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:119
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:69
#define VTK_FLOAT_MAX
Definition: vtkType.h:163