VTK
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 =========================================================================*/
31 #ifndef vtkLinearSelector_h
32 #define vtkLinearSelector_h
33 
34 #include "vtkFiltersSelectionModule.h" // For export macro
35 #include "vtkSelectionAlgorithm.h"
36 
37 class vtkAlgorithmOutput;
38 class vtkDataSet;
39 class vtkDoubleArray;
40 class vtkIdTypeArray;
41 class vtkPoints;
42 
43 class VTKFILTERSSELECTION_EXPORT vtkLinearSelector : public vtkSelectionAlgorithm
44 {
45  public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
49  static vtkLinearSelector* New();
50 
52 
55  vtkSetVector3Macro(StartPoint,double);
56  vtkGetVectorMacro(StartPoint,double,3);
58 
60 
63  vtkSetVector3Macro(EndPoint,double);
64  vtkGetVectorMacro(EndPoint,double,3);
66 
68 
71  virtual void SetPoints(vtkPoints*);
72  vtkGetObjectMacro(Points,vtkPoints);
74 
76 
79  vtkSetMacro(Tolerance,double);
80  vtkGetMacro(Tolerance,double);
82 
84 
87  vtkSetMacro(IncludeVertices,bool);
88  vtkGetMacro(IncludeVertices,bool);
89  vtkBooleanMacro(IncludeVertices,bool);
91 
93 
96  vtkSetClampMacro(VertexEliminationTolerance,double,0.,.1 );
97  vtkGetMacro(VertexEliminationTolerance,double);
99 
100  protected:
102  ~vtkLinearSelector() override;
103 
104  int FillInputPortInformation(int port, vtkInformation *info) override;
105 
106  int RequestData(vtkInformation *request,
107  vtkInformationVector **inputVector,
108  vtkInformationVector *outputVector) override;
109 
114  void SeekIntersectingCells(vtkDataSet* input, vtkIdTypeArray* outIndices);
115 
116  private:
117  vtkLinearSelector(const vtkLinearSelector&) = delete;
118  void operator =(const vtkLinearSelector&) = delete;
119 
121 
125  double StartPoint[3];
126  double EndPoint[3];
128 
133  vtkPoints* Points;
134 
138  double Tolerance;
139 
144  bool IncludeVertices;
145 
147 
151  double VertexEliminationTolerance;
152 };
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:56
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:33
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:33