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 
42 
43 class vtkPlanes;
44 class vtkInformation;
46 class vtkCell;
47 class vtkPoints;
48 class vtkDoubleArray;
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58  unsigned long GetMTime();
59 
61 
62  virtual void SetFrustum(vtkPlanes*);
63  vtkGetObjectMacro(Frustum,vtkPlanes);
65 
70  void CreateFrustum(double vertices[32]);
71 
73 
75  vtkGetObjectMacro(ClipPoints, vtkPoints);
77 
79 
80  vtkSetMacro(FieldType,int);
81  vtkGetMacro(FieldType,int);
83 
85 
87  vtkSetMacro(ContainingCells,int);
88  vtkGetMacro(ContainingCells,int);
90 
92  int OverallBoundsTest(double *bounds);
93 
95 
97  vtkSetMacro(ShowBounds,int);
98  vtkGetMacro(ShowBounds,int);
99  vtkBooleanMacro(ShowBounds,int);
101 
103 
104  vtkSetMacro(InsideOut,int);
105  vtkGetMacro(InsideOut,int);
106  vtkBooleanMacro(InsideOut,int);
108 
109 protected:
112 
113  // sets up output dataset
114  virtual int RequestDataObject(vtkInformation* request,
115  vtkInformationVector** inputVector,
116  vtkInformationVector* outputVector);
117 
118  //execution
119  virtual int RequestData(vtkInformation *,
121  int ABoxFrustumIsect(double bounds[], vtkCell *cell);
122  int FrustumClipPolygon(int nverts,
123  double *ivlist, double *wvlist, double *ovlist);
124  void PlaneClipPolygon(int nverts, double *ivlist,
125  int pid, int &noverts, double *ovlist);
126  void PlaneClipEdge(double *V0, double *V1,
127  int pid, int &noverts, double *overts);
128  int IsectDegenerateCell(vtkCell *cell);
129 
130 
131  //used in CreateFrustum
132  void ComputePlane(int idx,
133  double v0[3], double v1[2], double v2[3],
134  vtkPoints *points, vtkDoubleArray *norms);
135 
136  //modes
140 
141  //used internally
143  int np_vertids[6][2];
144 
145  //for debugging
151 
152 private:
153  vtkExtractSelectedFrustum(const vtkExtractSelectedFrustum&); // Not implemented.
154  void operator=(const vtkExtractSelectedFrustum&); // Not implemented.
155 
156 };
157 
158 #endif
159 
160 
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GRAPHICS_EXPORT
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:52
dynamic, self-adjusting array of double
abstract class to specify cell behavior
Definition: vtkCell.h:57
void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
Returns the portion of the input dataset that lies within a selection frustum.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38