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