VTK
vtkClipHyperOctree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClipHyperOctree.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 =========================================================================*/
62 #ifndef __vtkClipHyperOctree_h
63 #define __vtkClipHyperOctree_h
64 
66 
70 class vtkHyperOctree;
72 class vtkIdTypeArray;
73 class vtkCellArray;
74 class vtkCellData;
75 class vtkPointData;
77 class vtkDoubleArray;
78 class vtkTetra;
79 class vtkPoints;
80 class vtkPolygon;
82 
84 {
85 public:
87  void PrintSelf(ostream& os, vtkIndent indent);
88 
91  static vtkClipHyperOctree *New();
92 
94 
97  vtkSetMacro(Value,double);
98  vtkGetMacro(Value,double);
100 
102 
107  vtkSetMacro(InsideOut,int);
108  vtkGetMacro(InsideOut,int);
109  vtkBooleanMacro(InsideOut,int);
111 
113 
116  virtual void SetClipFunction(vtkImplicitFunction*);
117  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
119 
121 
125  vtkSetMacro(GenerateClipScalars,int);
126  vtkGetMacro(GenerateClipScalars,int);
127  vtkBooleanMacro(GenerateClipScalars,int);
129 
131 
133  vtkSetMacro(GenerateClippedOutput,int);
134  vtkGetMacro(GenerateClippedOutput,int);
135  vtkBooleanMacro(GenerateClippedOutput,int);
137 
139  vtkUnstructuredGrid *GetClippedOutput();
140 
142 
144  void SetLocator(vtkIncrementalPointLocator *locator);
145  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
147 
150  void CreateDefaultLocator();
151 
153  unsigned long GetMTime();
154 
155 protected:
158 
160 
162 
164  void ClipNode(vtkHyperOctreeCursor *cursor,
165  int level,
166  double bounds[6]);
168 
171 
173  vtkIncrementalPointLocator *Locator2; // used for the clipped output
174 
176  double Value;
178 
180 
184 
186  vtkIdTypeArray *Locs[2];
187  vtkCellArray *Conn[2];
189  vtkCellData *OutCD[2];
190  vtkPointData *OutPD[2];
192 
193  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
194 
198 
201 
202  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
204  vtkIdType TemplateCounter; // record the number of octants that succceed
205  // to use the template triangulator
206 
208 
209 private:
210  vtkClipHyperOctree(const vtkClipHyperOctree&); // Not implemented.
211  void operator=(const vtkClipHyperOctree&); // Not implemented.
212 };
213 
214 #endif