VTK  9.5.20250910
vtkHandleSource.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
15#ifndef vtkHandleSource_h
16#define vtkHandleSource_h
17
18#include "vtkFiltersSourcesModule.h" // For export macro
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21
22VTK_ABI_NAMESPACE_BEGIN
23class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkHandleSource : public vtkPolyDataAlgorithm
24{
25public:
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
30
36 vtkSetMacro(Directional, bool);
37 vtkGetMacro(Directional, bool);
38 vtkBooleanMacro(Directional, bool);
40
42
45 void SetPosition(const double pos[3]) { this->SetPosition(pos[0], pos[1], pos[2]); }
46 virtual void SetPosition(double xPos, double yPos, double zPos) = 0;
48
50
53 void GetPosition(double pos[3]);
54 virtual double* GetPosition() = 0;
56
58
62 void SetDirection(const double dir[3]) { this->SetDirection(dir[0], dir[1], dir[2]); }
63 virtual void SetDirection(double xDir, double yDir, double zDir) = 0;
65
67
71 void GetDirection(double dir[3]);
72 virtual double* GetDirection() = 0;
74
76
81 vtkSetMacro(Size, double);
82 vtkGetMacro(Size, double);
84
86 void operator=(const vtkHandleSource&) = delete;
87
88protected:
90 ~vtkHandleSource() override = default;
91
92 // Flag to indicate if the handle should be aware of any direction.
93 bool Directional = false;
94
95 double Size = 0.5;
96};
97
98VTK_ABI_NAMESPACE_END
99#endif
interface that can be inherited to define handler sources for any kind of interaction.
void operator=(const vtkHandleSource &)=delete
void GetDirection(double dir[3])
Get the direction of the handle.
void GetPosition(double pos[3])
Get the position of the handle.
void SetPosition(const double pos[3])
Set the position of the handle.
vtkHandleSource(const vtkHandleSource &)=delete
void SetDirection(const double dir[3])
Set the direction of the handle.
virtual void SetPosition(double xPos, double yPos, double zPos)=0
Set the position of the handle.
virtual void SetDirection(double xDir, double yDir, double zDir)=0
Set the direction of the handle.
virtual double * GetPosition()=0
Get the position of the handle.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkHandleSource() override=default
virtual double * GetDirection()=0
Get the direction of the handle.
a simple class to control print indentation
Definition vtkIndent.h:108
Superclass for algorithms that produce only polydata as output.
#define VTK_MARSHALAUTO