VTK
vtkHyperTreeCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeCursor.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 =========================================================================*/
28 #ifndef vtkHyperTreeCursor_h
29 #define vtkHyperTreeCursor_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 enum
35 {
44 };
45 
50 
53 
54 class vtkHyperTree;
55 
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63  virtual vtkHyperTree* GetTree() = 0;
64 
67  virtual vtkIdType GetLeafId() = 0;
68 
70  virtual vtkIdType GetNodeId() = 0;
71 
73  virtual bool IsLeaf() = 0;
74 
75  // Are the children of the current node all leaves?
76  // This query can be called also on a leaf node.
77  // \post compatible: result implies !IsLeaf()
78  virtual bool IsTerminalNode() = 0;
79 
81  virtual bool IsRoot() = 0;
82 
85  virtual int GetCurrentLevel() = 0;
86 
90  virtual int GetChildIndex() = 0;
91 
94  virtual void ToRoot() = 0;
95 
98  virtual void ToParent() = 0;
99 
103  virtual void ToChild( int child ) = 0;
104 
108  virtual void ToSameNode( vtkHyperTreeCursor* other ) = 0;
109 
112  virtual bool IsEqual( vtkHyperTreeCursor* other ) = 0;
113 
116  virtual vtkHyperTreeCursor* Clone() = 0;
117 
120  virtual int SameTree( vtkHyperTreeCursor* other ) = 0;
121 
126  virtual int GetIndex( int d ) = 0;
127 
130  virtual int GetNumberOfChildren() = 0;
131 
133  virtual int GetDimension() = 0;
134 
141  virtual void MoveToNode( int* indices, int level ) = 0;
142 
144  virtual bool Found() = 0;
145 
146 protected:
147  // Constructor.
149  virtual ~vtkHyperTreeCursor();
150 
151 private:
152  vtkHyperTreeCursor(const vtkHyperTreeCursor&); // Not implemented.
153  void operator=(const vtkHyperTreeCursor&); // Not implemented.
154 };
155 #endif
const int VTK_2TREE_CHILD_NE
abstract base class for most VTK objects
Definition: vtkObject.h:61
const int VTK_2TREE_CHILD_SW
int vtkIdType
Definition: vtkType.h:247
Objects that can traverse hypertree nodes.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
const int VTK_2TREE_CHILD_SE
An object structured as a tree where each node has exactly either 2^n or 3^n children.
Definition: vtkHyperTree.h:133
const int VTK_1TREE_TREE_CHILD_LEFT
#define VTKCOMMONDATAMODEL_EXPORT
const int VTK_2TREE_CHILD_NW
const int VTK_1TREE_TREE_CHILD_RIGHT