VTK  9.0.1
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 =========================================================================*/
30 #ifndef vtkLinearSelector_h
31 #define vtkLinearSelector_h
32 
33 #include "vtkFiltersSelectionModule.h" // For export macro
34 #include "vtkSelectionAlgorithm.h"
35 
36 class vtkAlgorithmOutput;
37 class vtkDataSet;
38 class vtkDoubleArray;
39 class vtkIdTypeArray;
40 class vtkPoints;
41 
42 class VTKFILTERSSELECTION_EXPORT vtkLinearSelector : public vtkSelectionAlgorithm
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
48  static vtkLinearSelector* New();
49 
51 
54  vtkSetVector3Macro(StartPoint, double);
55  vtkGetVectorMacro(StartPoint, double, 3);
57 
59 
62  vtkSetVector3Macro(EndPoint, double);
63  vtkGetVectorMacro(EndPoint, double, 3);
65 
67 
70  virtual void SetPoints(vtkPoints*);
71  vtkGetObjectMacro(Points, vtkPoints);
73 
75 
78  vtkSetMacro(Tolerance, double);
79  vtkGetMacro(Tolerance, double);
81 
83 
86  vtkSetMacro(IncludeVertices, bool);
87  vtkGetMacro(IncludeVertices, bool);
88  vtkBooleanMacro(IncludeVertices, bool);
90 
92 
95  vtkSetClampMacro(VertexEliminationTolerance, double, 0., .1);
96  vtkGetMacro(VertexEliminationTolerance, double);
98 
99 protected:
101  ~vtkLinearSelector() override;
102 
103  int FillInputPortInformation(int port, vtkInformation* info) override;
104 
105  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
106  vtkInformationVector* outputVector) override;
107 
112  void SeekIntersectingCells(vtkDataSet* input, vtkIdTypeArray* outIndices);
113 
114 private:
115  vtkLinearSelector(const vtkLinearSelector&) = delete;
116  void operator=(const vtkLinearSelector&) = delete;
117 
119 
123  double StartPoint[3];
124  double EndPoint[3];
126 
131  vtkPoints* Points;
132 
136  double Tolerance;
137 
142  bool IncludeVertices;
143 
145 
149  double VertexEliminationTolerance;
151 };
152 
153 #endif // vtkLinearSelector_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkLinearSelector
select cells intersecting a line (possibly broken)
Definition: vtkLinearSelector.h:42
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSelectionAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSelectionAlgorithm.h
vtkSelectionAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkSelectionAlgorithm::New
static vtkSelectionAlgorithm * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSelectionAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:46
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35