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 
65 #include "vtkFiltersHyperTreeModule.h" // For export macro
67 
71 class vtkHyperOctree;
73 class vtkIdTypeArray;
74 class vtkCellArray;
75 class vtkCellData;
76 class vtkPointData;
78 class vtkDoubleArray;
79 class vtkTetra;
80 class vtkPoints;
81 class vtkPolygon;
83 
85 {
86 public:
88  void PrintSelf(ostream& os, vtkIndent indent);
89 
92  static vtkClipHyperOctree *New();
93 
95 
98  vtkSetMacro(Value,double);
99  vtkGetMacro(Value,double);
101 
103 
108  vtkSetMacro(InsideOut,int);
109  vtkGetMacro(InsideOut,int);
110  vtkBooleanMacro(InsideOut,int);
112 
114 
117  virtual void SetClipFunction(vtkImplicitFunction*);
118  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
120 
122 
126  vtkSetMacro(GenerateClipScalars,int);
127  vtkGetMacro(GenerateClipScalars,int);
128  vtkBooleanMacro(GenerateClipScalars,int);
130 
132 
134  vtkSetMacro(GenerateClippedOutput,int);
135  vtkGetMacro(GenerateClippedOutput,int);
136  vtkBooleanMacro(GenerateClippedOutput,int);
138 
140  vtkUnstructuredGrid *GetClippedOutput();
141 
143 
145  void SetLocator(vtkIncrementalPointLocator *locator);
146  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
148 
151  void CreateDefaultLocator();
152 
154  unsigned long GetMTime();
155 
156 protected:
159 
161 
163 
165  void ClipNode(vtkHyperOctreeCursor *cursor,
166  int level,
167  double bounds[6]);
169 
172 
174  vtkIncrementalPointLocator *Locator2; // used for the clipped output
175 
177  double Value;
179 
181 
185 
187  vtkIdTypeArray *Locs[2];
188  vtkCellArray *Conn[2];
190  vtkCellData *OutCD[2];
191  vtkPointData *OutPD[2];
193 
194  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
195 
199 
202 
203  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
205  vtkIdType TemplateCounter; // record the number of octants that succceed
206  // to use the template triangulator
207 
209 
210 private:
211  vtkClipHyperOctree(const vtkClipHyperOctree&); // Not implemented.
212  void operator=(const vtkClipHyperOctree&); // Not implemented.
213 };
214 
215 #endif
abstract interface for implicit functions
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkImplicitFunction * ClipFunction
vtkHyperOctreeCursor * Sibling
represent and manipulate point attribute data
Definition: vtkPointData.h:36
Store vtkAlgorithm input/output information.
vtkDoubleArray * CellScalars
vtkHyperOctree * Input
vtkOrderedTriangulator * Triangulator
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
vtkDoubleArray * TetScalars
helper class to generate triangulations
A concrete implementation of vtkHyperOctreePointsGrabber used by vtkClipHyperOctree and vtkHyperOctre...
virtual int FillInputPortInformation(int port, vtkInformation *info)
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
A dataset structured as a tree where each node has exactly 2^n children.
vtkIncrementalPointLocator * Locator
#define VTKFILTERSHYPERTREE_EXPORT
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:46
vtkHyperOctreeClipCutPointsGrabber * Grabber
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
void PrintSelf(ostream &os, vtkIndent indent)
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:44
Superclass for algorithms that produce only unstructured grid as output.
dynamic, self-adjusting array of unsigned char
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
vtkIncrementalPointLocator * Locator2
vtkUnstructuredGrid * ClippedOutput
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkUnstructuredGrid * Output
clip an hyperoctree with user-specified implicit function or input scalar data