VTK  9.3.20240328
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:
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 
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
generate polygonal cone
interface that can be inherited to define handler sources for any kind of interaction.
virtual double * GetPosition()=0
Get the position of the handle.
void SetPosition(const double pos[3])
Set the position of the handle.
void SetDirection(const double dir[3])
Set the direction of the handle.
virtual double * GetDirection()=0
Get the direction of the handle.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
handle source used to represent points.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void operator=(const vtkPointHandleSource &)=delete
static vtkPointHandleSource * New()
vtkNew< vtkSphereSource > PositionSphere
~vtkPointHandleSource() override=default
vtkPointHandleSource()=default
double * GetDirection() override
Set/Get the direction of the handle.
void SetPosition(double xPos, double yPos, double zPos) override
Set/Get the position of the handle.
vtkNew< vtkConeSource > PositionCone
void SetDirection(double xDir, double yDir, double zDir) override
Set/Get the direction of the handle.
vtkPointHandleSource(const vtkPointHandleSource &)=delete
double * GetPosition() override
Set/Get the position of the handle.
create a polygonal sphere centered at the origin