VTK  9.0.3
vtkFrustumSelector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFrustumSelector.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 =========================================================================*/
24 #ifndef vtkFrustumSelector_h
25 #define vtkFrustumSelector_h
26 
27 #include "vtkFiltersExtractionModule.h" // For export macro
28 #include "vtkSelector.h"
29 
30 #include "vtkSmartPointer.h" // for smart pointer
31 
32 class vtkDataSet;
33 class vtkPlanes;
34 class vtkSignedCharArray;
35 
36 class VTKFILTERSEXTRACTION_EXPORT vtkFrustumSelector : public vtkSelector
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  void Initialize(vtkSelectionNode* node) override;
44 
48  vtkMTimeType GetMTime() override;
49 
51 
57 
58 protected:
60  ~vtkFrustumSelector() override;
61 
63 
64  bool ComputeSelectedElements(vtkDataObject* input, vtkSignedCharArray* insidednessArray) override;
65 
75  void CreateFrustum(double vertices[32]);
76 
87 
88  int OverallBoundsTest(double bounds[6]);
89 
90 private:
91  vtkFrustumSelector(const vtkFrustumSelector&) = delete;
92  void operator=(const vtkFrustumSelector&) = delete;
93 };
94 
95 #endif
general representation of visualization data
Definition: vtkDataObject.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the Frustum.
vtkPlanes * GetFrustum()
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 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 simple class to control print indentation
Definition: vtkIndent.h:34
implicit function for convex set of planes
Definition: vtkPlanes.h:50
A node in a selection tree.
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:293