VTK  9.1.0
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=========================================================================*/
102#ifndef vtkPointPicker_h
103#define vtkPointPicker_h
104
105#include "vtkPicker.h"
106#include "vtkRenderingCoreModule.h" // For export macro
107
108class vtkDataSet;
109
110class VTKRENDERINGCORE_EXPORT vtkPointPicker : public vtkPicker
111{
112public:
114
118 vtkTypeMacro(vtkPointPicker, vtkPicker);
119 void PrintSelf(ostream& os, vtkIndent indent) override;
121
123
126 vtkGetMacro(PointId, vtkIdType);
128
130
134 vtkSetMacro(UseCells, vtkTypeBool);
135 vtkGetMacro(UseCells, vtkTypeBool);
136 vtkBooleanMacro(UseCells, vtkTypeBool);
138
139protected:
141 ~vtkPointPicker() override = default;
142
143 vtkIdType PointId; // picked point
144 vtkTypeBool UseCells; // Use cell points vs. points directly
145
146 double IntersectWithLine(const double p1[3], const double p2[3], double tol,
147 vtkAssemblyPath* path, vtkProp3D* p, vtkAbstractMapper3D* m) override;
148 void Initialize() override;
149
150 vtkIdType IntersectDataSetWithLine(const double p1[3], double ray[3], double rayFactor,
151 double tol, vtkDataSet* dataSet, double& tMin, double minXYZ[3]);
152
153private:
154 vtkPointPicker(const vtkPointPicker&) = delete;
155 void operator=(const vtkPointPicker&) = delete;
156};
157
158#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:166
a simple class to control print indentation
Definition: vtkIndent.h:113
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:56
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.
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
static vtkPointPicker * New()
Standard methods for instantiation, type information, and printing.
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:93
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332