VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkConeSource;
23 class vtkSphereSource;
24 
25 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkPointHandleSource : public vtkHandleSource
26 {
27 public:
28  static vtkPointHandleSource* New();
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
38  void SetPosition(double xPos, double yPos, double zPos) override;
40  double* GetPosition() override;
42 
44 
51  void SetDirection(double xDir, double yDir, double zDir) override;
53  double* GetDirection() override;
55 
57  void operator=(const vtkPointHandleSource&) = delete;
58 
59 protected:
61  ~vtkPointHandleSource() override;
63 
64  void RecomputeSphere();
65  void RecomputeCone();
66 
67  double Position[3] = { 0, 0, 0 };
68  double Direction[3] = { 1, 0, 0 };
69 
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 #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:34
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.
#define VTK_MARSHALAUTO
void operator=(const vtkHandleSource &)=delete