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);
90 
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 
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 
157 
159 
164  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
166 
172 
177 
178 protected:
181 
183 
190  int level,
191  double bounds[6]);
192 
195 
197  vtkIncrementalPointLocator *Locator2; // used for the clipped output
198 
200  double Value;
202 
204 
208 
210  vtkIdTypeArray *Locs[2];
211  vtkCellArray *Conn[2];
213  vtkCellData *OutCD[2];
214  vtkPointData *OutPD[2];
216 
217  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
218 
222 
225 
226  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
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
object to represent cell connectivity
Definition: vtkCellArray.h:51
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
clip an hyperoctree with user-specified implicit function or input scalar data
void ClipNode(vtkHyperOctreeCursor *cursor, int level, double bounds[6])
Clip the sub-hierarchy pointed by cursor.
vtkImplicitFunction * ClipFunction
vtkHyperOctreeClipCutPointsGrabber * Grabber
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDoubleArray * CellScalars
vtkUnstructuredGrid * ClippedOutput
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkIncrementalPointLocator * Locator2
vtkClipHyperOctree(vtkImplicitFunction *cf=NULL)
static vtkClipHyperOctree * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
vtkIncrementalPointLocator * Locator
vtkMTimeType GetMTime()
Return the mtime also considering the locator and clip function.
vtkHyperOctree * Input
vtkDoubleArray * TetScalars
vtkUnstructuredGrid * Output
vtkUnstructuredGrid * GetClippedOutput()
Return the Clipped output.
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkHyperOctreeCursor * Sibling
vtkOrderedTriangulator * Triangulator
void CreateDefaultLocator()
Create default locator.
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
dynamic, self-adjusting array of double
A concrete implementation of vtkHyperOctreePointsGrabber used by vtkClipHyperOctree and vtkHyperOctre...
Objects that can traverse hyperoctree nodes.
A dataset structured as a tree where each node has exactly 2^n children.
dynamic, self-adjusting array of vtkIdType
abstract interface for implicit functions
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
helper class to generate triangulations
represent and manipulate point attribute data
Definition: vtkPointData.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:46
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
dynamic, self-adjusting array of unsigned char
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ level
Definition: vtkX3D.h:395
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248