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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkClipHyperOctree::Output
vtkUnstructuredGrid * Output
Definition: vtkClipHyperOctree.h:206
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPolygon
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:45
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkClipHyperOctree::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkClipHyperOctree.h:196
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkHyperOctreeCursor
Objects that can traverse hyperoctree nodes.
Definition: vtkHyperOctreeCursor.h:51
vtkClipHyperOctree::TetScalars
vtkDoubleArray * TetScalars
Definition: vtkClipHyperOctree.h:221
vtkClipHyperOctree::ClippedOutput
vtkUnstructuredGrid * ClippedOutput
Definition: vtkClipHyperOctree.h:207
vtkClipHyperOctree::Sibling
vtkHyperOctreeCursor * Sibling
Definition: vtkClipHyperOctree.h:217
vtkHyperOctreeClipCutPointsGrabber
A concrete implementation of vtkHyperOctreePointsGrabber used by vtkClipHyperOctree and vtkHyperOctre...
Definition: vtkHyperOctreeClipCutPointsGrabber.h:36
vtkOrderedTriangulator
helper class to generate triangulations
Definition: vtkOrderedTriangulator.h:117
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkClipHyperOctree::Locator2
vtkIncrementalPointLocator * Locator2
Definition: vtkClipHyperOctree.h:197
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:58
vtkX3D::level
Definition: vtkX3D.h:395
vtkX3D::port
Definition: vtkX3D.h:447
vtkClipHyperOctree::Grabber
vtkHyperOctreeClipCutPointsGrabber * Grabber
Definition: vtkClipHyperOctree.h:231
vtkClipHyperOctree::TotalCounter
vtkIdType TotalCounter
Definition: vtkClipHyperOctree.h:227
vtkClipHyperOctree::TemplateCounter
vtkIdType TemplateCounter
Definition: vtkClipHyperOctree.h:228
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkClipHyperOctree::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkClipHyperOctree.h:194
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkClipHyperOctree::GenerateClippedOutput
int GenerateClippedOutput
Definition: vtkClipHyperOctree.h:203
vtkClipHyperOctree::InsideOut
int InsideOut
Definition: vtkClipHyperOctree.h:199
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkUnstructuredGridAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkClipHyperOctree::Triangulator
vtkOrderedTriangulator * Triangulator
Definition: vtkClipHyperOctree.h:215
vtkClipHyperOctree::Pts
vtkPoints * Pts
Definition: vtkClipHyperOctree.h:223
vtkClipHyperOctree::Value
double Value
Definition: vtkClipHyperOctree.h:200
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
Definition: vtkX3D.h:376
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:41
vtkClipHyperOctree::CellScalars
vtkDoubleArray * CellScalars
Definition: vtkClipHyperOctree.h:219
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkClipHyperOctree::InCD
vtkCellData * InCD
Definition: vtkClipHyperOctree.h:212
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81
vtkHyperOctree
A dataset structured as a tree where each node has exactly 2^n children.
Definition: vtkHyperOctree.h:143
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
vtkClipHyperOctree
clip an hyperoctree with user-specified implicit function or input scalar data
Definition: vtkClipHyperOctree.h:85
vtkClipHyperOctree::Polygon
vtkPolygon * Polygon
Definition: vtkClipHyperOctree.h:224
vtkClipHyperOctree::Tetra
vtkTetra * Tetra
Definition: vtkClipHyperOctree.h:220
vtkClipHyperOctree::Input
vtkHyperOctree * Input
Definition: vtkClipHyperOctree.h:205
vtkClipHyperOctree::GenerateClipScalars
int GenerateClipScalars
Definition: vtkClipHyperOctree.h:201