VTK
dox
Common
DataModel
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
=========================================================================*/
29
#ifndef vtkHyperTreeCursor_h
30
#define vtkHyperTreeCursor_h
31
32
#include "vtkCommonDataModelModule.h"
// For export macro
33
#include "
vtkObject.h
"
34
35
enum
36
{
37
VTK_3TREE_CHILD_ZMIN_YMIN_XMIN
=0,
38
VTK_3TREE_CHILD_ZMIN_YMIN_XMAX
,
39
VTK_3TREE_CHILD_ZMIN_YMAX_XMIN
,
40
VTK_3TREE_CHILD_ZMIN_YMAX_XMAX
,
41
VTK_3TREE_CHILD_ZMAX_YMIN_XMIN
,
42
VTK_3TREE_CHILD_ZMAX_YMIN_XMAX
,
43
VTK_3TREE_CHILD_ZMAX_YMAX_XMIN
,
44
VTK_3TREE_CHILD_ZMAX_YMAX_XMAX
45
};
46
47
const
int
VTK_2TREE_CHILD_SW
=
VTK_3TREE_CHILD_ZMIN_YMIN_XMIN
;
48
const
int
VTK_2TREE_CHILD_SE
=
VTK_3TREE_CHILD_ZMIN_YMIN_XMAX
;
49
const
int
VTK_2TREE_CHILD_NW
=
VTK_3TREE_CHILD_ZMIN_YMAX_XMIN
;
50
const
int
VTK_2TREE_CHILD_NE
=
VTK_3TREE_CHILD_ZMIN_YMAX_XMAX
;
51
52
const
int
VTK_1TREE_TREE_CHILD_LEFT
=
VTK_2TREE_CHILD_SW
;
53
const
int
VTK_1TREE_TREE_CHILD_RIGHT
=
VTK_2TREE_CHILD_SE
;
54
55
class
vtkHyperTree
;
56
57
class
VTKCOMMONDATAMODEL_EXPORT
vtkHyperTreeCursor
:
public
vtkObject
58
{
59
public
:
60
vtkTypeMacro(
vtkHyperTreeCursor
,
vtkObject
);
61
void
PrintSelf
(ostream& os,
vtkIndent
indent) VTK_OVERRIDE;
62
66
virtual
vtkHyperTree
* GetTree() = 0;
67
72
virtual
vtkIdType
GetLeafId() = 0;
73
77
virtual
vtkIdType
GetNodeId() = 0;
78
82
virtual
bool
IsLeaf() = 0;
83
84
// Are the children of the current node all leaves?
85
// This query can be called also on a leaf node.
86
// \post compatible: result implies !IsLeaf()
87
virtual
bool
IsTerminalNode() = 0;
88
92
virtual
bool
IsRoot() = 0;
93
98
virtual
int
GetCurrentLevel() = 0;
99
105
virtual
int
GetChildIndex() = 0;
106
112
virtual
void
ToRoot() = 0;
113
118
virtual
void
ToParent() = 0;
119
125
virtual
void
ToChild(
int
child ) = 0;
126
133
virtual
void
ToSameNode(
vtkHyperTreeCursor
* other ) = 0;
134
140
virtual
bool
IsEqual(
vtkHyperTreeCursor
* other ) = 0;
141
147
virtual
vtkHyperTreeCursor
* Clone() = 0;
148
153
virtual
int
SameTree(
vtkHyperTreeCursor
* other ) = 0;
154
161
virtual
int
GetIndex(
int
d ) = 0;
162
167
virtual
int
GetNumberOfChildren() = 0;
168
173
virtual
int
GetDimension() = 0;
174
185
virtual
void
MoveToNode(
int
* indices,
int
level
) = 0;
186
190
virtual
bool
Found() = 0;
191
192
protected
:
193
// Constructor.
194
vtkHyperTreeCursor
();
195
~
vtkHyperTreeCursor
() VTK_OVERRIDE;
196
197
private:
198
vtkHyperTreeCursor
(const
vtkHyperTreeCursor
&) VTK_DELETE_FUNCTION;
199
void
operator=(const
vtkHyperTreeCursor
&) VTK_DELETE_FUNCTION;
200
};
201
#endif
VTK_2TREE_CHILD_SE
const int VTK_2TREE_CHILD_SE
Definition:
vtkHyperTreeCursor.h:48
vtkIdType
int vtkIdType
Definition:
vtkType.h:287
VTK_3TREE_CHILD_ZMAX_YMIN_XMIN
Definition:
vtkHyperTreeCursor.h:41
VTK_3TREE_CHILD_ZMIN_YMAX_XMAX
Definition:
vtkHyperTreeCursor.h:40
VTK_2TREE_CHILD_NE
const int VTK_2TREE_CHILD_NE
Definition:
vtkHyperTreeCursor.h:50
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
VTK_3TREE_CHILD_ZMIN_YMAX_XMIN
Definition:
vtkHyperTreeCursor.h:39
VTK_3TREE_CHILD_ZMAX_YMAX_XMIN
Definition:
vtkHyperTreeCursor.h:43
VTK_3TREE_CHILD_ZMAX_YMAX_XMAX
Definition:
vtkHyperTreeCursor.h:44
VTK_1TREE_TREE_CHILD_LEFT
const int VTK_1TREE_TREE_CHILD_LEFT
Definition:
vtkHyperTreeCursor.h:52
VTK_2TREE_CHILD_SW
const int VTK_2TREE_CHILD_SW
Definition:
vtkHyperTreeCursor.h:47
vtkX3D::level
Definition:
vtkX3D.h:395
vtkHyperTreeCursor
Objects that can traverse hypertree nodes.
Definition:
vtkHyperTreeCursor.h:57
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkHyperTree
An object structured as a tree where each node has exactly either 2^n or 3^n children.
Definition:
vtkHyperTree.h:134
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
VTK_3TREE_CHILD_ZMAX_YMIN_XMAX
Definition:
vtkHyperTreeCursor.h:42
VTK_2TREE_CHILD_NW
const int VTK_2TREE_CHILD_NW
Definition:
vtkHyperTreeCursor.h:49
VTK_3TREE_CHILD_ZMIN_YMIN_XMIN
Definition:
vtkHyperTreeCursor.h:37
VTK_1TREE_TREE_CHILD_RIGHT
const int VTK_1TREE_TREE_CHILD_RIGHT
Definition:
vtkHyperTreeCursor.h:53
VTK_3TREE_CHILD_ZMIN_YMIN_XMAX
Definition:
vtkHyperTreeCursor.h:38
Generated by
1.8.16