VTK  9.3.1
vtkFrustumSelector.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
12 #ifndef vtkFrustumSelector_h
13 #define vtkFrustumSelector_h
14 
15 #include "vtkFiltersExtractionModule.h" // For export macro
16 #include "vtkSelector.h"
17 
18 #include "vtkSmartPointer.h" // for smart pointer
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkDataSet;
22 class vtkHyperTreeGrid;
23 class vtkPlanes;
24 class vtkSignedCharArray;
25 
26 class VTKFILTERSEXTRACTION_EXPORT vtkFrustumSelector : public vtkSelector
27 {
28 public:
29  static vtkFrustumSelector* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  void Initialize(vtkSelectionNode* node) override;
34 
38  vtkMTimeType GetMTime() override;
39 
41 
44  void SetFrustum(vtkPlanes*);
45  vtkPlanes* GetFrustum();
47 
48 protected:
49  vtkFrustumSelector(vtkPlanes* f = nullptr);
50  ~vtkFrustumSelector() override;
51 
53 
54  bool ComputeSelectedElements(vtkDataObject* input, vtkSignedCharArray* insidednessArray) override;
55 
65  void CreateFrustum(double vertices[32]);
66 
71  void ComputeSelectedPoints(vtkDataSet* input, vtkSignedCharArray* pointsInside);
72 
74 
78  void ComputeSelectedCells(vtkDataSet* input, vtkSignedCharArray* cellsInside);
79  void ComputeSelectedCells(vtkHyperTreeGrid* input, vtkSignedCharArray* cellsInside);
81 
82  int OverallBoundsTest(double bounds[6]);
83 
84 private:
85  vtkFrustumSelector(const vtkFrustumSelector&) = delete;
86  void operator=(const vtkFrustumSelector&) = delete;
87 };
88 
89 VTK_ABI_NAMESPACE_END
90 #endif
a node in a vtkSelection the defines the selection criteria.
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
implicit function for convex set of planes
Definition: vtkPlanes.h:41
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
virtual bool ComputeSelectedElements(vtkDataObject *input, vtkSignedCharArray *insidednessArray)=0
This method computes whether or not each element in the dataset is inside the selection and populates...
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkSmartPointer< vtkPlanes > Frustum
virtual vtkMTimeType GetMTime()
Return this object's modified time.
dynamic, self-adjusting array of signed char
virtual void Initialize(vtkSelectionNode *node)
Sets the vtkSelectionNode used by this selection operator and initializes the data structures in the ...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:54
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.