VTK  9.1.0
vtkExtractSelectedFrustum.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkExtractSelectedFrustum.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=========================================================================*/
36#ifndef vtkExtractSelectedFrustum_h
37#define vtkExtractSelectedFrustum_h
38
40#include "vtkFiltersGeneralModule.h" // For export macro
41
42class vtkPlanes;
43class vtkInformation;
45class vtkCell;
46class vtkPoints;
47class vtkDoubleArray;
48
49class VTKFILTERSGENERAL_EXPORT vtkExtractSelectedFrustum : public vtkExtractSelectionBase
50{
51public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
60
62
65 virtual void SetFrustum(vtkPlanes*);
66 vtkGetObjectMacro(Frustum, vtkPlanes);
68
78 void CreateFrustum(double vertices[32]);
79
81
85 vtkGetObjectMacro(ClipPoints, vtkPoints);
87
89
92 vtkSetMacro(FieldType, int);
93 vtkGetMacro(FieldType, int);
95
97
101 vtkSetMacro(ContainingCells, int);
102 vtkGetMacro(ContainingCells, int);
104
108 int OverallBoundsTest(double* bounds);
109
111
115 vtkSetMacro(ShowBounds, vtkTypeBool);
116 vtkGetMacro(ShowBounds, vtkTypeBool);
117 vtkBooleanMacro(ShowBounds, vtkTypeBool);
119
121
124 vtkSetMacro(InsideOut, vtkTypeBool);
125 vtkGetMacro(InsideOut, vtkTypeBool);
126 vtkBooleanMacro(InsideOut, vtkTypeBool);
128
129protected:
132
133 // sets up output dataset
135 vtkInformationVector* outputVector) override;
136
137 // execution
139 int ABoxFrustumIsect(double bounds[], vtkCell* cell);
140 int FrustumClipPolygon(int nverts, double* ivlist, double* wvlist, double* ovlist);
141 void PlaneClipPolygon(int nverts, double* ivlist, int pid, int& noverts, double* ovlist);
142 void PlaneClipEdge(double* V0, double* V1, int pid, int& noverts, double* overts);
144
145 // used in CreateFrustum
147 int idx, double v0[3], double v1[2], double v2[3], vtkPoints* points, vtkDoubleArray* norms);
148
149 // modes
153
154 // used internally
156 int np_vertids[6][2];
157
158 // for debugging
164
165private:
167 void operator=(const vtkExtractSelectedFrustum&) = delete;
168};
169
170#endif
abstract class to specify cell behavior
Definition: vtkCell.h:147
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()
int ABoxFrustumIsect(double bounds[], vtkCell *cell)
void ComputePlane(int idx, double v0[3], double v1[2], double v2[3], vtkPoints *points, vtkDoubleArray *norms)
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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
implicit function for convex set of planes
Definition: vtkPlanes.h:159
represent and manipulate 3D points
Definition: vtkPoints.h:143
@ points
Definition: vtkX3D.h:452
int vtkTypeBool
Definition: vtkABI.h:69
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287