VTK  9.3.20240328
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:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  void Initialize(vtkSelectionNode* node) override;
34 
38  vtkMTimeType GetMTime() override;
39 
41 
47 
48 protected:
50  ~vtkFrustumSelector() override;
51 
53 
54  bool ComputeSelectedElements(vtkDataObject* input, vtkSignedCharArray* insidednessArray) override;
55 
65  void CreateFrustum(double vertices[32]);
66 
72 
74 
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
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the Frustum.
vtkPlanes * GetFrustum()
Set the selection frustum.
int OverallBoundsTest(double bounds[6])
bool ComputeSelectedElements(vtkDataObject *input, vtkSignedCharArray *insidednessArray) override
This method computes whether or not each element in the dataset is inside the selection and populates...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkFrustumSelector() override
void Initialize(vtkSelectionNode *node) override
Sets the vtkSelectionNode used by this selection operator and initializes the data structures in the ...
void ComputeSelectedCells(vtkDataSet *input, vtkSignedCharArray *cellsInside)
Computes which cells in the dataset are inside or intersect the frustum and populates the cellsInside...
void CreateFrustum(double vertices[32])
Given eight vertices, creates a frustum.
void ComputeSelectedCells(vtkHyperTreeGrid *input, vtkSignedCharArray *cellsInside)
Computes which cells in the dataset are inside or intersect the frustum and populates the cellsInside...
void SetFrustum(vtkPlanes *)
Set the selection frustum.
vtkFrustumSelector(vtkPlanes *f=nullptr)
vtkSmartPointer< vtkPlanes > Frustum
static vtkFrustumSelector * New()
void ComputeSelectedPoints(vtkDataSet *input, vtkSignedCharArray *pointsInside)
Computes which points in the dataset are inside the frustum and populates the pointsInside array with...
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition: vtkIndent.h:108
implicit function for convex set of planes
Definition: vtkPlanes.h:151
a node in a vtkSelection the defines the selection criteria.
dynamic, self-adjusting array of signed char
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270