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 =========================================================================*/
63 #ifndef vtkClipHyperOctree_h
64 #define vtkClipHyperOctree_h
65 
66 #include "vtkFiltersHyperTreeModule.h" // For export macro
68 
72 class vtkHyperOctree;
74 class vtkIdTypeArray;
75 class vtkCellArray;
76 class vtkCellData;
77 class vtkPointData;
79 class vtkDoubleArray;
80 class vtkTetra;
81 class vtkPoints;
82 class vtkPolygon;
84 
85 class VTKFILTERSHYPERTREE_EXPORT vtkClipHyperOctree : public vtkUnstructuredGridAlgorithm
86 {
87 public:
89  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
90 
95  static vtkClipHyperOctree *New();
96 
98 
103  vtkSetMacro(Value,double);
104  vtkGetMacro(Value,double);
106 
108 
116  vtkSetMacro(InsideOut,int);
117  vtkGetMacro(InsideOut,int);
118  vtkBooleanMacro(InsideOut,int);
120 
122 
127  virtual void SetClipFunction(vtkImplicitFunction*);
128  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
130 
132 
138  vtkSetMacro(GenerateClipScalars,int);
139  vtkGetMacro(GenerateClipScalars,int);
140  vtkBooleanMacro(GenerateClipScalars,int);
142 
144 
148  vtkSetMacro(GenerateClippedOutput,int);
149  vtkGetMacro(GenerateClippedOutput,int);
150  vtkBooleanMacro(GenerateClippedOutput,int);
152 
156  vtkUnstructuredGrid *GetClippedOutput();
157 
159 
163  void SetLocator(vtkIncrementalPointLocator *locator);
164  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
166 
171  void CreateDefaultLocator();
172 
176  vtkMTimeType GetMTime() VTK_OVERRIDE;
177 
178 protected:
180  ~vtkClipHyperOctree() VTK_OVERRIDE;
181 
182  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
183 
189  void ClipNode(vtkHyperOctreeCursor *cursor,
190  int level,
191  double bounds[6]);
192 
193  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
194  vtkImplicitFunction *ClipFunction;
195 
197  vtkIncrementalPointLocator *Locator2; // used for the clipped output
198 
199  int InsideOut;
200  double Value;
201  int GenerateClipScalars;
202 
203  int GenerateClippedOutput;
204 
207  vtkUnstructuredGrid *ClippedOutput;
208 
210  vtkIdTypeArray *Locs[2];
211  vtkCellArray *Conn[2];
212  vtkCellData *InCD;
213  vtkCellData *OutCD[2];
214  vtkPointData *OutPD[2];
215  vtkOrderedTriangulator *Triangulator;
216 
217  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
218 
219  vtkDoubleArray *CellScalars;
220  vtkTetra *Tetra;
221  vtkDoubleArray *TetScalars;
222 
223  vtkPoints *Pts;
224  vtkPolygon *Polygon;
225 
226  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
227  vtkIdType TotalCounter;
228  vtkIdType TemplateCounter; // record the number of octants that succceed
229  // to use the template triangulator
230 
232 
233 private:
234  vtkClipHyperOctree(const vtkClipHyperOctree&) VTK_DELETE_FUNCTION;
235  void operator=(const vtkClipHyperOctree&) VTK_DELETE_FUNCTION;
236 };
237 
238 #endif
abstract interface for implicit functions
represent and manipulate point attribute data
Definition: vtkPointData.h:37
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
helper class to generate triangulations
A concrete implementation of vtkHyperOctreePointsGrabber used by vtkClipHyperOctree and vtkHyperOctre...
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
A dataset structured as a tree where each node has exactly 2^n children.
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
dataset represents arbitrary combinations of all possible cell types
virtual vtkMTimeType GetMTime()
Return this object's modified time.
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:45
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:50
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:39
clip an hyperoctree with user-specified implicit function or input scalar data