VTK  9.3.20240221
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 
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 
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
Proxy object to connect input/output ports.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
dynamic, self-adjusting array of double
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
select cells intersecting a line (possibly broken)
void SeekIntersectingCells(vtkDataSet *input, vtkIdTypeArray *outIndices)
The main routine that iterates over cells and looks for those that intersect at least one of the segm...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
virtual void SetPoints(vtkPoints *)
Set/Get the list of points defining the intersecting broken line.
~vtkLinearSelector() override
static vtkLinearSelector * New()
represent and manipulate 3D points
Definition: vtkPoints.h:138
Superclass for algorithms that produce only Selection as output.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447