VTK  9.2.6
vtkPointHandleSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointHandleSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkPointHandleSource_h
27 #define vtkPointHandleSource_h
28 
29 #include "vtkFiltersSourcesModule.h" // For export macro
30 #include "vtkHandleSource.h"
31 
32 class vtkConeSource;
33 class vtkSphereSource;
34 
35 class VTKFILTERSSOURCES_EXPORT vtkPointHandleSource : public vtkHandleSource
36 {
37 public:
38  static vtkPointHandleSource* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
48  void SetPosition(double xPos, double yPos, double zPos) override;
50  double* GetPosition() override;
52 
54 
61  void SetDirection(double xDir, double yDir, double zDir) override;
63  double* GetDirection() override;
65 
67  void operator=(const vtkPointHandleSource&) = delete;
68 
69 protected:
70  vtkPointHandleSource() = default;
71  ~vtkPointHandleSource() override = default;
73 
74  void RecomputeSphere();
75  void RecomputeCone();
76 
77  double Position[3] = { 0, 0, 0 };
78  double Direction[3] = { 1, 0, 0 };
79 
82 };
83 
84 #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:44
static vtkPolyDataAlgorithm * New()
create a polygonal sphere centered at the origin
vtkNew< vtkSphereSource > PositionSphere
a simple class to control print indentation
Definition: vtkIndent.h:39
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