VTK  9.2.6
vtkLinearSelector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkLinearSelector.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 vtkLinearSelector_h
34 #define vtkLinearSelector_h
35 
36 #include "vtkFiltersSelectionModule.h" // For export macro
37 #include "vtkSelectionAlgorithm.h"
38 
39 class vtkAlgorithmOutput;
40 class vtkDataSet;
41 class vtkDoubleArray;
42 class vtkIdTypeArray;
43 class vtkPoints;
44 
45 class VTKFILTERSSELECTION_EXPORT vtkLinearSelector : public vtkSelectionAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  static vtkLinearSelector* New();
52 
54 
57  vtkSetVector3Macro(StartPoint, double);
58  vtkGetVectorMacro(StartPoint, double, 3);
60 
62 
65  vtkSetVector3Macro(EndPoint, double);
66  vtkGetVectorMacro(EndPoint, double, 3);
68 
70 
73  virtual void SetPoints(vtkPoints*);
74  vtkGetObjectMacro(Points, vtkPoints);
76 
78 
81  vtkSetMacro(Tolerance, double);
82  vtkGetMacro(Tolerance, double);
84 
86 
89  vtkSetMacro(IncludeVertices, bool);
90  vtkGetMacro(IncludeVertices, bool);
91  vtkBooleanMacro(IncludeVertices, bool);
93 
95 
98  vtkSetClampMacro(VertexEliminationTolerance, double, 0., .1);
99  vtkGetMacro(VertexEliminationTolerance, double);
101 
102 protected:
104  ~vtkLinearSelector() override;
105 
106  int FillInputPortInformation(int port, vtkInformation* info) override;
107 
108  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
109  vtkInformationVector* outputVector) override;
110 
115  void SeekIntersectingCells(vtkDataSet* input, vtkIdTypeArray* outIndices);
116 
117 private:
118  vtkLinearSelector(const vtkLinearSelector&) = delete;
119  void operator=(const vtkLinearSelector&) = delete;
120 
122 
126  double StartPoint[3];
127  double EndPoint[3];
129 
134  vtkPoints* Points;
135 
139  double Tolerance;
140 
145  bool IncludeVertices;
146 
148 
152  double VertexEliminationTolerance;
154 };
155 
156 #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:62
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:39
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:39