VTK  9.3.1
vtkPointHandleSource.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
14 #ifndef vtkPointHandleSource_h
15 #define vtkPointHandleSource_h
16 
17 #include "vtkFiltersSourcesModule.h" // For export macro
18 #include "vtkHandleSource.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkConeSource;
22 class vtkSphereSource;
23 
24 class VTKFILTERSSOURCES_EXPORT vtkPointHandleSource : public vtkHandleSource
25 {
26 public:
27  static vtkPointHandleSource* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
37  void SetPosition(double xPos, double yPos, double zPos) override;
39  double* GetPosition() override;
41 
43 
50  void SetDirection(double xDir, double yDir, double zDir) override;
52  double* GetDirection() override;
54 
56  void operator=(const vtkPointHandleSource&) = delete;
57 
58 protected:
59  vtkPointHandleSource() = default;
60  ~vtkPointHandleSource() override = default;
62 
63  void RecomputeSphere();
64  void RecomputeCone();
65 
66  double Position[3] = { 0, 0, 0 };
67  double Direction[3] = { 1, 0, 0 };
68 
71 };
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
virtual double * GetPosition()=0
Get the position of the handle.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkNew< vtkConeSource > PositionCone
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual double * GetDirection()=0
Get the direction of the handle.
interface that can be inherited to define handler sources for any kind of interaction.
generate polygonal cone
Definition: vtkConeSource.h:33
static vtkPolyDataAlgorithm * New()
create a polygonal sphere centered at the origin
vtkNew< vtkSphereSource > PositionSphere
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetDirection(const double dir[3])
Set the direction of the handle.
void SetPosition(const double pos[3])
Set the position of the handle.
handle source used to represent points.
Store zero or more vtkInformation instances.
void operator=(const vtkHandleSource &)=delete