VTK
vtkSimpleScalarTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSimpleScalarTree.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 =========================================================================*/
34 #ifndef __vtkSimpleScalarTree_h
35 #define __vtkSimpleScalarTree_h
36 
37 #include "vtkScalarTree.h"
38 
39 //BTX
40 class vtkScalarNode;
41 //ETX
42 
44 {
45 public:
48  static vtkSimpleScalarTree *New();
49 
51 
53  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
61  vtkSetClampMacro(BranchingFactor,int,2,VTK_LARGE_INTEGER);
62  vtkGetMacro(BranchingFactor,int);
64 
66 
68  vtkGetMacro(Level,int);
70 
72 
73  vtkSetClampMacro(MaxLevel,int,1,VTK_LARGE_INTEGER);
74  vtkGetMacro(MaxLevel,int);
76 
80  virtual void BuildTree();
81 
83  virtual void Initialize();
84 
87  virtual void InitTraversal(double scalarValue);
88 
90 
94  virtual vtkCell *GetNextCell(vtkIdType &cellId, vtkIdList* &ptIds,
95  vtkDataArray *cellScalars);
97 
98 protected:
101 
103  int MaxLevel;
104  int Level;
105  int BranchingFactor; //number of children per node
106  vtkScalarNode *Tree; //pointerless scalar range tree
107  int TreeSize; //allocated size of tree
108 
109 private:
110  vtkIdType TreeIndex; //traversal location within tree
111  vtkIdType LeafOffset; //offset to leaf nodes of tree
112  int ChildNumber; //current child in traversal
113  vtkIdType CellId; //current cell id being examined
114  int FindStartLeaf(vtkIdType index, int level);
115  int FindNextLeaf(vtkIdType index,int level);
116 
117 private:
118  vtkSimpleScalarTree(const vtkSimpleScalarTree&); // Not implemented.
119  void operator=(const vtkSimpleScalarTree&); // Not implemented.
120 };
121 
122 #endif
123 
124 
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
virtual void InitTraversal(double scalarValue)=0
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
virtual vtkCell * GetNextCell(vtkIdType &cellId, vtkIdList *&ptIds, vtkDataArray *cellScalars)=0
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:45
virtual void Initialize()=0
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
static vtkObject * New()
void PrintSelf(ostream &os, vtkIndent indent)
virtual void BuildTree()=0
organize data according to scalar values (used to accelerate contouring operations) ...