VTK
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:
39  static vtkFrustumSelector *New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  void Initialize(vtkSelectionNode* node, const std::string& insidednessArrayName) override;
44 
48  vtkMTimeType GetMTime() override;
49 
51 
54  void SetFrustum(vtkPlanes*);
55  vtkPlanes* GetFrustum();
57 
58 protected:
59  vtkFrustumSelector(vtkPlanes *f=nullptr);
60  ~vtkFrustumSelector() override;
61 
63 
65  vtkSignedCharArray* insidednessArray, unsigned int compositeIndex,
66  unsigned int amrLevel, unsigned int amrIndex) override;
67 
77  void CreateFrustum(double vertices[32]);
78 
83  void ComputeSelectedPoints(vtkDataSet* input, vtkSignedCharArray* pointsInside);
88  void ComputeSelectedCells(vtkDataSet* input, vtkSignedCharArray* cellsInside);
89 
90  int OverallBoundsTest(double bounds[6]);
91 
92 private:
93  vtkFrustumSelector(const vtkFrustumSelector&) = delete;
94  void operator=(const vtkFrustumSelector&) = delete;
95 };
96 
97 #endif
A node in a selection tree.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
implicit function for convex set of planes
Definition: vtkPlanes.h:55
virtual void Initialize(vtkSelectionNode *node, const std::string &insidednessArrayName)
Sets the vtkSelectionNode used by this selection operator and initializes the data structures in the ...
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual bool ComputeSelectedElementsForBlock(vtkDataObject *input, vtkSignedCharArray *insidednessArray, unsigned int compositeIndex, unsigned int amrLevel, unsigned int amrIndex)=0
This method computes whether or not each element in the dataset is inside the selection and populates...
vtkSmartPointer< vtkPlanes > Frustum
virtual vtkMTimeType GetMTime()
Return this object&#39;s modified time.
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
dynamic, self-adjusting array of signed char
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:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.