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.
150 
151 private:
152  vtkHyperTreeCursor(const vtkHyperTreeCursor&); // Not implemented.
153  void operator=(const vtkHyperTreeCursor&); // Not implemented.
154 };
155 #endif
vtkHyperTreeCursor::Clone
virtual vtkHyperTreeCursor * Clone()=0
vtkHyperTreeCursor::GetCurrentLevel
virtual int GetCurrentLevel()=0
vtkHyperTreeCursor::GetTree
virtual vtkHyperTree * GetTree()=0
vtkHyperTreeCursor::GetChildIndex
virtual int GetChildIndex()=0
VTK_2TREE_CHILD_SE
const int VTK_2TREE_CHILD_SE
Definition: vtkHyperTreeCursor.h:47
vtkHyperTreeCursor::IsEqual
virtual bool IsEqual(vtkHyperTreeCursor *other)=0
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkHyperTreeCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkHyperTreeCursor::GetLeafId
virtual vtkIdType GetLeafId()=0
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkHyperTreeCursor::GetNodeId
virtual vtkIdType GetNodeId()=0
VTK_2TREE_CHILD_NE
const int VTK_2TREE_CHILD_NE
Definition: vtkHyperTreeCursor.h:49
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
VTK_3TREE_CHILD_ZMIN_YMAX_XMIN
@ VTK_3TREE_CHILD_ZMIN_YMAX_XMIN
Definition: vtkHyperTreeCursor.h:38
vtkHyperTreeCursor::GetNumberOfChildren
virtual int GetNumberOfChildren()=0
VTK_3TREE_CHILD_ZMAX_YMIN_XMAX
@ VTK_3TREE_CHILD_ZMAX_YMIN_XMAX
Definition: vtkHyperTreeCursor.h:41
VTK_1TREE_TREE_CHILD_LEFT
const int VTK_1TREE_TREE_CHILD_LEFT
Definition: vtkHyperTreeCursor.h:51
VTK_2TREE_CHILD_SW
const int VTK_2TREE_CHILD_SW
Definition: vtkHyperTreeCursor.h:46
vtkHyperTreeCursor::~vtkHyperTreeCursor
virtual ~vtkHyperTreeCursor()
vtkHyperTreeCursor::vtkHyperTreeCursor
vtkHyperTreeCursor()
vtkHyperTreeCursor
Objects that can traverse hypertree nodes.
Definition: vtkHyperTreeCursor.h:57
VTK_3TREE_CHILD_ZMAX_YMAX_XMAX
@ VTK_3TREE_CHILD_ZMAX_YMAX_XMAX
Definition: vtkHyperTreeCursor.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkgl::indices
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: vtkgl.h:11315
vtkHyperTreeCursor::GetIndex
virtual int GetIndex(int d)=0
vtkHyperTree
An object structured as a tree where each node has exactly either 2^n or 3^n children.
Definition: vtkHyperTree.h:134
VTK_3TREE_CHILD_ZMIN_YMAX_XMAX
@ VTK_3TREE_CHILD_ZMIN_YMAX_XMAX
Definition: vtkHyperTreeCursor.h:39
vtkHyperTreeCursor::IsRoot
virtual bool IsRoot()=0
vtkHyperTreeCursor::SameTree
virtual int SameTree(vtkHyperTreeCursor *other)=0
VTK_3TREE_CHILD_ZMIN_YMIN_XMIN
@ VTK_3TREE_CHILD_ZMIN_YMIN_XMIN
Definition: vtkHyperTreeCursor.h:36
VTK_3TREE_CHILD_ZMAX_YMIN_XMIN
@ VTK_3TREE_CHILD_ZMAX_YMIN_XMIN
Definition: vtkHyperTreeCursor.h:40
vtkgl::level
GLint level
Definition: vtkgl.h:11316
vtkHyperTreeCursor::ToRoot
virtual void ToRoot()=0
vtkObject.h
vtkHyperTreeCursor::Found
virtual bool Found()=0
vtkHyperTreeCursor::ToSameNode
virtual void ToSameNode(vtkHyperTreeCursor *other)=0
vtkHyperTreeCursor::MoveToNode
virtual void MoveToNode(int *indices, int level)=0
VTK_2TREE_CHILD_NW
const int VTK_2TREE_CHILD_NW
Definition: vtkHyperTreeCursor.h:48
VTK_3TREE_CHILD_ZMAX_YMAX_XMIN
@ VTK_3TREE_CHILD_ZMAX_YMAX_XMIN
Definition: vtkHyperTreeCursor.h:42
vtkHyperTreeCursor::ToChild
virtual void ToChild(int child)=0
vtkHyperTreeCursor::ToParent
virtual void ToParent()=0
vtkHyperTreeCursor::GetDimension
virtual int GetDimension()=0
VTK_1TREE_TREE_CHILD_RIGHT
const int VTK_1TREE_TREE_CHILD_RIGHT
Definition: vtkHyperTreeCursor.h:52
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkHyperTreeCursor::IsTerminalNode
virtual bool IsTerminalNode()=0
vtkHyperTreeCursor::IsLeaf
virtual bool IsLeaf()=0
VTK_3TREE_CHILD_ZMIN_YMIN_XMAX
@ VTK_3TREE_CHILD_ZMIN_YMIN_XMAX
Definition: vtkHyperTreeCursor.h:37