VTK  9.3.1
vtkExtractSelectedFrustum.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
27 #ifndef vtkExtractSelectedFrustum_h
28 #define vtkExtractSelectedFrustum_h
29 
31 #include "vtkFiltersGeneralModule.h" // For export macro
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkPlanes;
35 class vtkInformation;
37 class vtkCell;
38 class vtkPoints;
39 class vtkDoubleArray;
40 
41 class VTKFILTERSGENERAL_EXPORT vtkExtractSelectedFrustum : public vtkExtractSelectionBase
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  vtkMTimeType GetMTime() override;
52 
54 
57  virtual void SetFrustum(vtkPlanes*);
58  vtkGetObjectMacro(Frustum, vtkPlanes);
60 
70  void CreateFrustum(double vertices[32]);
71 
73 
77  vtkGetObjectMacro(ClipPoints, vtkPoints);
79 
81 
84  vtkSetMacro(FieldType, int);
85  vtkGetMacro(FieldType, int);
87 
89 
93  vtkSetMacro(ContainingCells, int);
94  vtkGetMacro(ContainingCells, int);
96 
100  int OverallBoundsTest(double* bounds);
101 
103 
107  vtkSetMacro(ShowBounds, vtkTypeBool);
108  vtkGetMacro(ShowBounds, vtkTypeBool);
109  vtkBooleanMacro(ShowBounds, vtkTypeBool);
111 
113 
116  vtkSetMacro(InsideOut, vtkTypeBool);
117  vtkGetMacro(InsideOut, vtkTypeBool);
118  vtkBooleanMacro(InsideOut, vtkTypeBool);
120 
121 protected:
122  vtkExtractSelectedFrustum(vtkPlanes* f = nullptr);
123  ~vtkExtractSelectedFrustum() override;
124 
125  // sets up output dataset
126  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
127  vtkInformationVector* outputVector) override;
128 
129  // execution
131  int ABoxFrustumIsect(double bounds[], vtkCell* cell);
132  int FrustumClipPolygon(int nverts, double* ivlist, double* wvlist, double* ovlist);
133  void PlaneClipPolygon(int nverts, double* ivlist, int pid, int& noverts, double* ovlist);
134  void PlaneClipEdge(double* V0, double* V1, int pid, int& noverts, double* overts);
135  int IsectDegenerateCell(vtkCell* cell);
136 
137  // used in CreateFrustum
138  void ComputePlane(
139  int idx, double v0[3], double v1[3], double v2[3], vtkPoints* points, vtkDoubleArray* norms);
140 
141  // modes
145 
146  // used internally
148  int np_vertids[6][2];
149 
150  // for debugging
156 
157 private:
159  void operator=(const vtkExtractSelectedFrustum&) = delete;
160 };
161 
162 VTK_ABI_NAMESPACE_END
163 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
static vtkDataObjectAlgorithm * New()
abstract base class for all extract selection filters.
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)
dynamic, self-adjusting array of double
int vtkTypeBool
Definition: vtkABI.h:64
abstract class to specify cell behavior
Definition: vtkCell.h:49
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Sets up empty output dataset.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Returns the portion of the input dataset that lies within a selection frustum.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.