VTK
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 =========================================================================*/
38 #ifndef vtkExtractSelectedFrustum_h
39 #define vtkExtractSelectedFrustum_h
40 
41 #include "vtkFiltersExtractionModule.h" // For export macro
43 
44 class vtkPlanes;
45 class vtkInformation;
47 class vtkCell;
48 class vtkPoints;
49 class vtkDoubleArray;
50 
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59  unsigned long GetMTime();
60 
62 
63  virtual void SetFrustum(vtkPlanes*);
64  vtkGetObjectMacro(Frustum,vtkPlanes);
66 
71  void CreateFrustum(double vertices[32]);
72 
74 
76  vtkGetObjectMacro(ClipPoints, vtkPoints);
78 
80 
81  vtkSetMacro(FieldType,int);
82  vtkGetMacro(FieldType,int);
84 
86 
88  vtkSetMacro(ContainingCells,int);
89  vtkGetMacro(ContainingCells,int);
91 
93  int OverallBoundsTest(double *bounds);
94 
96 
98  vtkSetMacro(ShowBounds,int);
99  vtkGetMacro(ShowBounds,int);
100  vtkBooleanMacro(ShowBounds,int);
102 
104 
105  vtkSetMacro(InsideOut,int);
106  vtkGetMacro(InsideOut,int);
107  vtkBooleanMacro(InsideOut,int);
109 
110 protected:
113 
114  // sets up output dataset
115  virtual int RequestDataObject(vtkInformation* request,
116  vtkInformationVector** inputVector,
117  vtkInformationVector* outputVector);
118 
119  //execution
120  virtual int RequestData(vtkInformation *,
122  int ABoxFrustumIsect(double bounds[], vtkCell *cell);
123  int FrustumClipPolygon(int nverts,
124  double *ivlist, double *wvlist, double *ovlist);
125  void PlaneClipPolygon(int nverts, double *ivlist,
126  int pid, int &noverts, double *ovlist);
127  void PlaneClipEdge(double *V0, double *V1,
128  int pid, int &noverts, double *overts);
129  int IsectDegenerateCell(vtkCell *cell);
130 
131 
132  //used in CreateFrustum
133  void ComputePlane(int idx,
134  double v0[3], double v1[2], double v2[3],
135  vtkPoints *points, vtkDoubleArray *norms);
136 
137  //modes
141 
142  //used internally
144  int np_vertids[6][2];
145 
146  //for debugging
152 
153 private:
154  vtkExtractSelectedFrustum(const vtkExtractSelectedFrustum&); // Not implemented.
155  void operator=(const vtkExtractSelectedFrustum&); // Not implemented.
156 
157 };
158 
159 #endif
160 
161 
vtksys_stl::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
abstract base class for all extract selection filters.
implicit function for convex set of planes
Definition: vtkPlanes.h:53
dynamic, self-adjusting array of double
abstract class to specify cell behavior
Definition: vtkCell.h:61
void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSEXTRACTION_EXPORT
Returns the portion of the input dataset that lies within a selection frustum.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38