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 =========================================================================*/
45 #ifndef vtkPointPicker_h
46 #define vtkPointPicker_h
47 
48 #include "vtkPicker.h"
49 #include "vtkRenderingCoreModule.h" // For export macro
50 
51 class vtkDataSet;
52 
53 class VTKRENDERINGCORE_EXPORT vtkPointPicker : public vtkPicker
54 {
55 public:
57 
60  static vtkPointPicker* New();
61  vtkTypeMacro(vtkPointPicker, vtkPicker);
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
69  vtkGetMacro(PointId, vtkIdType);
71 
73 
77  vtkSetMacro(UseCells, vtkTypeBool);
78  vtkGetMacro(UseCells, vtkTypeBool);
79  vtkBooleanMacro(UseCells, vtkTypeBool);
81 
82 protected:
84  ~vtkPointPicker() override = default;
85 
86  vtkIdType PointId; // picked point
87  vtkTypeBool UseCells; // Use cell points vs. points directly
88 
89  double IntersectWithLine(const double p1[3], const double p2[3], double tol,
90  vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
91  void Initialize() override;
92 
93  vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
94  double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
95 
96 private:
97  vtkPointPicker(const vtkPointPicker&) = delete;
98  void operator=(const vtkPointPicker&) = delete;
99 };
100 
101 #endif
abstract class specifies interface to map 3D data
a list of nodes that form an assembly path
abstract class to specify dataset behavior
Definition: vtkDataSet.h:72
a simple class to control print indentation
Definition: vtkIndent.h:49
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:62
select a point by shooting a ray into a graphics window
double IntersectWithLine(const double p1[3], const double p2[3], double tol, vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m) override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
static vtkPointPicker * New()
Standard methods for instantiation, type information, and printing.
vtkTypeBool UseCells
vtkIdType PointId
~vtkPointPicker() override=default
vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor, double tol, vtkDataSet *dataSet, double &tMin, double minXYZ[3])
void Initialize() override
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:59
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332