45 #ifndef __vtkHyperTreeGrid_h
46 #define __vtkHyperTreeGrid_h
48 #include "vtkCommonDataModelModule.h"
49 #include "vtkDataSet.h"
59 class vtkDataSetAttributes;
75 static vtkInformationIntegerKey* LEVELS();
76 static vtkInformationIntegerKey* DIMENSION();
77 static vtkInformationDoubleVectorKey* SIZES();
81 void PrintSelf( ostream&, vtkIndent );
84 int GetDataObjectType();
88 void CopyStructure( vtkDataSet* );
92 void SetGridSize(
unsigned int[3] );
93 vtkGetVector3Macro(GridSize,
unsigned int);
100 vtkSetMacro(TransposedRootIndexing,
bool);
101 vtkGetMacro(TransposedRootIndexing,
bool);
103 { this->SetTransposedRootIndexing(
false ); }
105 { this->SetTransposedRootIndexing(
true ); }
111 void SetBranchFactor(
unsigned int );
112 vtkGetMacro(BranchFactor,
unsigned int);
117 void SetDimension(
unsigned int );
118 vtkGetMacro(Dimension,
unsigned int);
122 vtkIdType GetNumberOfCells();
125 vtkIdType GetNumberOfPoints();
128 vtkIdType GetNumberOfLeaves();
131 vtkIdType GetNumberOfLevels( vtkIdType );
134 vtkIdType GetNumberOfTrees();
138 void SetXCoordinates( vtkDataArray* );
139 vtkGetObjectMacro(XCoordinates, vtkDataArray);
144 void SetYCoordinates( vtkDataArray* );
145 vtkGetObjectMacro(YCoordinates, vtkDataArray);
150 void SetZCoordinates( vtkDataArray* );
151 vtkGetObjectMacro(ZCoordinates, vtkDataArray);
156 void SetMaterialMask( vtkBitArray* );
157 vtkGetObjectMacro(MaterialMask, vtkBitArray);
162 virtual void SetMaterialMaskIndex( vtkIdTypeArray* );
163 vtkGetObjectMacro(MaterialMaskIndex, vtkIdTypeArray);
167 virtual void GenerateTrees();
182 virtual double* GetPoint( vtkIdType );
189 virtual void GetPoint( vtkIdType,
double[3] );
195 virtual vtkCell* GetCell( vtkIdType );
209 virtual int GetCellType( vtkIdType );
216 virtual void GetCellPoints( vtkIdType, vtkIdList* );
220 virtual void GetCellPoints( vtkIdType, vtkIdType&, vtkIdType*& );
227 virtual void GetPointCells( vtkIdType, vtkIdList* );
237 virtual void GetCellNeighbors( vtkIdType, vtkIdList*, vtkIdList* );
242 virtual vtkIdType FindPoint(
double x[3] );
255 virtual vtkIdType FindCell(
double x[3], vtkCell *cell, vtkIdType cellId,
256 double tol2,
int& subId,
double pcoords[3],
266 virtual vtkIdType FindCell(
double x[3], vtkCell *cell,
268 double tol2,
int& subId,
double pcoords[3],
276 void InitializeTreeIterator( vtkHyperTreeIterator& );
281 virtual int GetMaxCellSize();
294 unsigned long GetActualMemorySize();
297 void GenerateSuperCursorTraversalTable();
305 void InitializeSuperCursor( vtkHyperTreeGridSuperCursor*,
310 void InitializeSuperCursor( vtkHyperTreeGridSuperCursor*,
316 void InitializeSuperCursorChild( vtkHyperTreeGridSuperCursor* parent,
317 vtkHyperTreeGridSuperCursor* child,
318 unsigned int childIdx );
325 vtkGetMacro(NumberOfChildren,
unsigned int);
331 void GetLevelZeroCoordsFromIndex( vtkIdType index,
342 void ComputeBounds();
344 void GetCell( vtkIdType, vtkCell* );
346 void ComputeDualGrid();
347 vtkPoints* GetPoints();
348 vtkIdTypeArray* GetConnectivity();
351 unsigned int GridSize[3];
368 std::map<vtkIdType, double> PointShifts[3];
371 void DeleteInternalArrays();
413 vtkIdType RecursiveFindPoint(
double x[3],
415 double* origin,
double* size);
436 vtkIdType GetGlobalNodeIndex();
442 unsigned short Level;
463 std::map<vtkIdType, vtkHyperTree*>::iterator
Iterator;
482 return this->Cursors + this->MiddleCursorId + idx;
std::map< vtkIdType, vtkHyperTree * > HyperTrees
object represents upward pointers from points to list of cells using each point
void SetIndexingModeToKJI()
unsigned int NumberOfChildren
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a cell that represents an orthogonal quadrilateral
vtkDataArray * ZCoordinates
unsigned short GetLevel()
unsigned int BranchFactor
void SetIndexingModeToIJK()
provides thread-safe access to cells
Objects that can traverse hypertree nodes.
vtkDataArray * YCoordinates
vtkIdTypeArray * Connectivity
std::map< vtkIdType, bool > PointShifted
vtkIdTypeArray * MaterialMaskIndex
An object structured as a tree where each node has exactly either 2^n or 3^n children.
bool TransposedRootIndexing
vtkHyperTreeSimpleCursor * GetCursor(int idx)
std::map< vtkIdType, double > ReductionFactors
vtkBitArray * MaterialMask
general representation of visualization data
std::map< vtkIdType, vtkHyperTree * >::iterator Iterator
vtkDataArray * XCoordinates