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 =========================================================================*/
60 #ifndef vtkClipHyperOctree_h
61 #define vtkClipHyperOctree_h
62 
63 #include "vtkFiltersHyperTreeModule.h" // For export macro
65 
69 class vtkHyperOctree;
71 class vtkIdTypeArray;
72 class vtkCellArray;
73 class vtkCellData;
74 class vtkPointData;
76 class vtkDoubleArray;
77 class vtkTetra;
78 class vtkPoints;
79 class vtkPolygon;
81 
82 class VTKFILTERSHYPERTREE_EXPORT vtkClipHyperOctree : public vtkUnstructuredGridAlgorithm
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
87 
92  static vtkClipHyperOctree *New();
93 
95 
100  vtkSetMacro(Value,double);
101  vtkGetMacro(Value,double);
103 
105 
113  vtkSetMacro(InsideOut,int);
114  vtkGetMacro(InsideOut,int);
115  vtkBooleanMacro(InsideOut,int);
117 
119 
124  virtual void SetClipFunction(vtkImplicitFunction*);
125  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
127 
129 
135  vtkSetMacro(GenerateClipScalars,int);
136  vtkGetMacro(GenerateClipScalars,int);
137  vtkBooleanMacro(GenerateClipScalars,int);
139 
141 
145  vtkSetMacro(GenerateClippedOutput,int);
146  vtkGetMacro(GenerateClippedOutput,int);
147  vtkBooleanMacro(GenerateClippedOutput,int);
149 
153  vtkUnstructuredGrid *GetClippedOutput();
154 
156 
160  void SetLocator(vtkIncrementalPointLocator *locator);
161  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
163 
168  void CreateDefaultLocator();
169 
173  vtkMTimeType GetMTime() VTK_OVERRIDE;
174 
175 protected:
177  ~vtkClipHyperOctree() VTK_OVERRIDE;
178 
179  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
180 
186  void ClipNode(vtkHyperOctreeCursor *cursor,
187  int level,
188  double bounds[6]);
189 
190  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
191  vtkImplicitFunction *ClipFunction;
192 
194  vtkIncrementalPointLocator *Locator2; // used for the clipped output
195 
196  int InsideOut;
197  double Value;
198  int GenerateClipScalars;
199 
200  int GenerateClippedOutput;
201 
204  vtkUnstructuredGrid *ClippedOutput;
205 
207  vtkIdTypeArray *Locs[2];
208  vtkCellArray *Conn[2];
209  vtkCellData *InCD;
210  vtkCellData *OutCD[2];
211  vtkPointData *OutPD[2];
212  vtkOrderedTriangulator *Triangulator;
213 
214  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
215 
216  vtkDoubleArray *CellScalars;
217  vtkTetra *Tetra;
218  vtkDoubleArray *TetScalars;
219 
220  vtkPoints *Pts;
221  vtkPolygon *Polygon;
222 
223  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
224  vtkIdType TotalCounter;
225  vtkIdType TemplateCounter; // record the number of octants that succceed
226  // to use the template triangulator
227 
229 
230 private:
231  vtkClipHyperOctree(const vtkClipHyperOctree&) VTK_DELETE_FUNCTION;
232  void operator=(const vtkClipHyperOctree&) VTK_DELETE_FUNCTION;
233 };
234 
235 #endif
abstract interface for implicit functions
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
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:41
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:33
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:39
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:44
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:33
clip an hyperoctree with user-specified implicit function or input scalar data