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 
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 
177 
178 protected:
181 
183 
189  void ClipNode(vtkHyperOctreeCursor *cursor,
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
abstract interface for implicit functions
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkImplicitFunction * ClipFunction
vtkHyperOctreeCursor * Sibling
represent and manipulate point attribute data
Definition: vtkPointData.h:37
Store vtkAlgorithm input/output information.
vtkDoubleArray * CellScalars
vtkHyperOctree * Input
vtkOrderedTriangulator * Triangulator
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
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...
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:287
A dataset structured as a tree where each node has exactly 2^n children.
vtkIncrementalPointLocator * Locator
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
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.
vtkHyperOctreeClipCutPointsGrabber * Grabber
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.
vtkIncrementalPointLocator * Locator2
vtkUnstructuredGrid * ClippedOutput
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkUnstructuredGrid * Output
clip an hyperoctree with user-specified implicit function or input scalar data