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 
69 #if !defined(VTK_LEGACY_REMOVE)
73 class vtkHyperOctree;
75 class vtkIdTypeArray;
76 class vtkCellArray;
77 class vtkCellData;
78 class vtkPointData;
80 class vtkDoubleArray;
81 class vtkTetra;
82 class vtkPoints;
83 class vtkPolygon;
85 
86 class VTKFILTERSHYPERTREE_EXPORT vtkClipHyperOctree : public vtkUnstructuredGridAlgorithm
87 {
88 public:
90  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
96  static vtkClipHyperOctree *New();
97 
99 
104  vtkSetMacro(Value,double);
105  vtkGetMacro(Value,double);
107 
109 
117  vtkSetMacro(InsideOut,int);
118  vtkGetMacro(InsideOut,int);
119  vtkBooleanMacro(InsideOut,int);
121 
123 
128  virtual void SetClipFunction(vtkImplicitFunction*);
129  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
131 
133 
139  vtkSetMacro(GenerateClipScalars,int);
140  vtkGetMacro(GenerateClipScalars,int);
141  vtkBooleanMacro(GenerateClipScalars,int);
143 
145 
149  vtkSetMacro(GenerateClippedOutput,int);
150  vtkGetMacro(GenerateClippedOutput,int);
151  vtkBooleanMacro(GenerateClippedOutput,int);
153 
157  vtkUnstructuredGrid *GetClippedOutput();
158 
160 
164  void SetLocator(vtkIncrementalPointLocator *locator);
165  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
167 
172  void CreateDefaultLocator();
173 
177  vtkMTimeType GetMTime() override;
178 
179 protected:
181  ~vtkClipHyperOctree() override;
182 
184 
190  void ClipNode(vtkHyperOctreeCursor *cursor,
191  int level,
192  double bounds[6]);
193 
194  int FillInputPortInformation(int port, vtkInformation *info) override;
196 
198  vtkIncrementalPointLocator *Locator2; // used for the clipped output
199 
201  double Value;
203 
205 
209 
211  vtkIdTypeArray *Locs[2];
212  vtkCellArray *Conn[2];
214  vtkCellData *OutCD[2];
215  vtkPointData *OutPD[2];
217 
218  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
219 
223 
226 
227  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
229  vtkIdType TemplateCounter; // record the number of octants that succceed
230  // to use the template triangulator
231 
233 
234 private:
235  vtkClipHyperOctree(const vtkClipHyperOctree&) = delete;
236  void operator=(const vtkClipHyperOctree&) = delete;
237 };
238 #endif // LEGACY remove
239 
240 #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
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
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:345
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.
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