VTK  9.3.20240420
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
33VTK_ABI_NAMESPACE_BEGIN
34class vtkPlanes;
35class vtkInformation;
37class vtkCell;
38class vtkPoints;
39class vtkDoubleArray;
40
41class VTKFILTERSGENERAL_EXPORT vtkExtractSelectedFrustum : public vtkExtractSelectionBase
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
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
121protected:
124
125 // sets up output dataset
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);
136
137 // used in CreateFrustum
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
157private:
159 void operator=(const vtkExtractSelectedFrustum&) = delete;
160};
161
162VTK_ABI_NAMESPACE_END
163#endif
abstract class to specify cell behavior
Definition vtkCell.h:130
dynamic, self-adjusting array of double
Returns the portion of the input dataset that lies within a selection frustum.
void CreateFrustum(double vertices[32])
Given eight vertices, creates a frustum.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void PlaneClipPolygon(int nverts, double *ivlist, int pid, int &noverts, double *ovlist)
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void PlaneClipEdge(double *V0, double *V1, int pid, int &noverts, double *overts)
vtkExtractSelectedFrustum(vtkPlanes *f=nullptr)
int FrustumClipPolygon(int nverts, double *ivlist, double *wvlist, double *ovlist)
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the Frustum.
~vtkExtractSelectedFrustum() override
static vtkExtractSelectedFrustum * New()
void ComputePlane(int idx, double v0[3], double v1[3], double v2[3], vtkPoints *points, vtkDoubleArray *norms)
int ABoxFrustumIsect(double bounds[], vtkCell *cell)
virtual void SetFrustum(vtkPlanes *)
Set the selection frustum.
int IsectDegenerateCell(vtkCell *cell)
int OverallBoundsTest(double *bounds)
Does a quick test on the AABBox defined by the bounds.
abstract base class for all extract selection filters.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
implicit function for convex set of planes
Definition vtkPlanes.h:151
represent and manipulate 3D points
Definition vtkPoints.h:139
int vtkTypeBool
Definition vtkABI.h:64
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270