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:
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 
57 
58 protected:
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 
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
vtkFrustumSelector::GetMTime
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the Frustum.
vtkSelectionNode
A node in a selection tree.
Definition: vtkSelectionNode.h:68
vtkFrustumSelector::New
static vtkFrustumSelector * New()
vtkFrustumSelector
Definition: vtkFrustumSelector.h:37
vtkSmartPointer< vtkPlanes >
vtkSignedCharArray
dynamic, self-adjusting array of signed char
Definition: vtkSignedCharArray.h:39
vtkPlanes
implicit function for convex set of planes
Definition: vtkPlanes.h:56
vtkSelector.h
vtkFrustumSelector::OverallBoundsTest
int OverallBoundsTest(double bounds[6])
vtkSelector
Definition: vtkSelector.h:36
vtkFrustumSelector::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFrustumSelector::ComputeSelectedCells
void ComputeSelectedCells(vtkDataSet *input, vtkSignedCharArray *cellsInside)
Computes which cells in the dataset are inside or intersect the frustum and populates the cellsInside...
vtkFrustumSelector::ComputeSelectedElementsForBlock
bool ComputeSelectedElementsForBlock(vtkDataObject *input, vtkSignedCharArray *insidednessArray, unsigned int compositeIndex, unsigned int amrLevel, unsigned int amrIndex) override
This method computes whether or not each element in the dataset is inside the selection and populates...
vtkFrustumSelector::ComputeSelectedPoints
void ComputeSelectedPoints(vtkDataSet *input, vtkSignedCharArray *pointsInside)
Computes which points in the dataset are inside the frustum and populates the pointsInside array with...
vertices
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:841
vtkFrustumSelector::SetFrustum
void SetFrustum(vtkPlanes *)
Set the selection frustum.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkFrustumSelector::vtkFrustumSelector
vtkFrustumSelector(vtkPlanes *f=nullptr)
vtkSmartPointer.h
vtkFrustumSelector::CreateFrustum
void CreateFrustum(double vertices[32])
Given eight vertices, creates a frustum.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkFrustumSelector::Initialize
void Initialize(vtkSelectionNode *node, const std::string &insidednessArrayName) override
Sets the vtkSelectionNode used by this selection operator and initializes the data structures in the ...
vtkFrustumSelector::Frustum
vtkSmartPointer< vtkPlanes > Frustum
Definition: vtkFrustumSelector.h:62
vtkFrustumSelector::GetFrustum
vtkPlanes * GetFrustum()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkFrustumSelector::~vtkFrustumSelector
~vtkFrustumSelector() override