VTK  9.4.20250102
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
41#ifndef vtkCursor2D_h
42#define vtkCursor2D_h
43
44#include "vtkFiltersGeneralModule.h" // For export macro
46
47VTK_ABI_NAMESPACE_BEGIN
48class VTKFILTERSGENERAL_EXPORT vtkCursor2D : public vtkPolyDataAlgorithm
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
58 static vtkCursor2D* New();
59
61
65 void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
66 void SetModelBounds(const double bounds[6]);
67 vtkGetVectorMacro(ModelBounds, double, 6);
69
71
79 void SetFocalPoint(double x[3]);
80 void SetFocalPoint(double x, double y, double z)
81 {
82 double xyz[3];
83 xyz[0] = x;
84 xyz[1] = y;
85 xyz[2] = z;
86 this->SetFocalPoint(xyz);
87 }
88 vtkGetVectorMacro(FocalPoint, double, 3);
90
92
95 vtkSetMacro(Outline, vtkTypeBool);
96 vtkGetMacro(Outline, vtkTypeBool);
97 vtkBooleanMacro(Outline, vtkTypeBool);
99
101
104 vtkSetMacro(Axes, vtkTypeBool);
105 vtkGetMacro(Axes, vtkTypeBool);
106 vtkBooleanMacro(Axes, vtkTypeBool);
108
110
114 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
115 vtkGetMacro(Radius, double);
117
119
122 vtkSetMacro(Point, vtkTypeBool);
123 vtkGetMacro(Point, vtkTypeBool);
124 vtkBooleanMacro(Point, vtkTypeBool);
126
128
133 vtkSetMacro(TranslationMode, vtkTypeBool);
134 vtkGetMacro(TranslationMode, vtkTypeBool);
135 vtkBooleanMacro(TranslationMode, vtkTypeBool);
137
139
144 vtkSetMacro(Wrap, vtkTypeBool);
145 vtkGetMacro(Wrap, vtkTypeBool);
146 vtkBooleanMacro(Wrap, vtkTypeBool);
148
150
153 void AllOn();
154 void AllOff();
156
157protected:
159 ~vtkCursor2D() override = default;
160
162
163 double ModelBounds[6];
164 double FocalPoint[3];
168 double Radius;
171
172private:
173 vtkCursor2D(const vtkCursor2D&) = delete;
174 void operator=(const vtkCursor2D&) = delete;
175};
176
177VTK_ABI_NAMESPACE_END
178#endif
generate a 2D cursor representation
Definition vtkCursor2D.h:49
double Radius
vtkTypeBool TranslationMode
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool Point
vtkTypeBool Wrap
~vtkCursor2D() override=default
vtkTypeBool Axes
void SetFocalPoint(double x, double y, double z)
Set/Get the position of cursor focus.
Definition vtkCursor2D.h:80
void AllOn()
Turn every part of the cursor on or off.
void SetFocalPoint(double x[3])
Set/Get the position of cursor focus.
static vtkCursor2D * New()
Construct with model bounds = (-10,10,-10,10), focal point = (0,0), radius=2, all parts of cursor vis...
void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Set / get the bounding box of the 2D cursor.
void AllOff()
Turn every part of the cursor on or off.
vtkTypeBool Outline
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:108
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