VTK  9.2.6
vtkPointPicker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointPicker.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 =========================================================================*/
36 #ifndef vtkPointPicker_h
37 #define vtkPointPicker_h
38 
39 #include "vtkPicker.h"
40 #include "vtkRenderingCoreModule.h" // For export macro
41 
42 class vtkDataSet;
43 
44 class VTKRENDERINGCORE_EXPORT vtkPointPicker : public vtkPicker
45 {
46 public:
48 
51  static vtkPointPicker* New();
52  vtkTypeMacro(vtkPointPicker, vtkPicker);
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
60  vtkGetMacro(PointId, vtkIdType);
62 
64 
68  vtkSetMacro(UseCells, vtkTypeBool);
69  vtkGetMacro(UseCells, vtkTypeBool);
70  vtkBooleanMacro(UseCells, vtkTypeBool);
72 
73 protected:
75  ~vtkPointPicker() override = default;
76 
77  vtkIdType PointId; // picked point
78  vtkTypeBool UseCells; // Use cell points vs. points directly
79 
80  double IntersectWithLine(const double p1[3], const double p2[3], double tol,
81  vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
82  void Initialize() override;
83 
84  vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
85  double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
86 
87 private:
88  vtkPointPicker(const vtkPointPicker&) = delete;
89  void operator=(const vtkPointPicker&) = delete;
90 };
91 
92 #endif
vtkTypeBool UseCells
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual double IntersectWithLine(const double p1[3], const double p2[3], double tol, vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m)
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:49
int vtkIdType
Definition: vtkType.h:332
vtkIdType PointId
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:61
int vtkTypeBool
Definition: vtkABI.h:69
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkPicker * New()
abstract class specifies interface to map 3D data
void Initialize() override
select a point by shooting a ray into a graphics window