VTK  9.3.1
vtkLinearSelector.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkLinearSelector_h
22 #define vtkLinearSelector_h
23 
24 #include "vtkFiltersSelectionModule.h" // For export macro
25 #include "vtkSelectionAlgorithm.h"
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkAlgorithmOutput;
29 class vtkDataSet;
30 class vtkDoubleArray;
31 class vtkIdTypeArray;
32 class vtkPoints;
33 
34 class VTKFILTERSSELECTION_EXPORT vtkLinearSelector : public vtkSelectionAlgorithm
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
40  static vtkLinearSelector* New();
41 
43 
46  vtkSetVector3Macro(StartPoint, double);
47  vtkGetVectorMacro(StartPoint, double, 3);
49 
51 
54  vtkSetVector3Macro(EndPoint, double);
55  vtkGetVectorMacro(EndPoint, double, 3);
57 
59 
62  virtual void SetPoints(vtkPoints*);
63  vtkGetObjectMacro(Points, vtkPoints);
65 
67 
70  vtkSetMacro(Tolerance, double);
71  vtkGetMacro(Tolerance, double);
73 
75 
78  vtkSetMacro(IncludeVertices, bool);
79  vtkGetMacro(IncludeVertices, bool);
80  vtkBooleanMacro(IncludeVertices, bool);
82 
84 
87  vtkSetClampMacro(VertexEliminationTolerance, double, 0., .1);
88  vtkGetMacro(VertexEliminationTolerance, double);
90 
91 protected:
93  ~vtkLinearSelector() override;
94 
96 
97  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector) override;
99 
104  void SeekIntersectingCells(vtkDataSet* input, vtkIdTypeArray* outIndices);
105 
106 private:
107  vtkLinearSelector(const vtkLinearSelector&) = delete;
108  void operator=(const vtkLinearSelector&) = delete;
109 
111 
115  double StartPoint[3];
116  double EndPoint[3];
118 
123  vtkPoints* Points;
124 
128  double Tolerance;
129 
134  bool IncludeVertices;
135 
137 
141  double VertexEliminationTolerance;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #endif // vtkLinearSelector_h
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of vtkIdType
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
select cells intersecting a line (possibly broken)
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for algorithms that produce only Selection as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:28