VTK
vtkHyperOctreeCursor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHyperOctreeCursor.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=========================================================================*/
25#ifndef vtkHyperOctreeCursor_h
26#define vtkHyperOctreeCursor_h
27
28#include "vtkCommonDataModelModule.h" // For export macro
29#include "vtkObject.h"
30
31enum
32{
41};
42
47
50
51class VTKCOMMONDATAMODEL_EXPORT vtkHyperOctreeCursor : public vtkObject
52{
53public:
55 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
56
61 virtual int GetLeafId()=0;
62
66 virtual int CurrentIsLeaf()=0;
67
71 virtual int CurrentIsRoot()=0;
72
77 virtual int GetCurrentLevel()=0;
78
84 virtual int GetChildIndex()=0;
85
86 // Are the children of the current node all leaves?
87 // This query can be called also on a leaf node.
88 // \post compatible: result implies !CurrentIsLeaf()
89 virtual int CurrentIsTerminalNode()=0;
90
96 virtual void ToRoot()=0;
97
102 virtual void ToParent()=0;
103
109 virtual void ToChild(int child)=0;
110
117 virtual void ToSameNode(vtkHyperOctreeCursor *other)=0;
118
124 virtual int IsEqual(vtkHyperOctreeCursor *other)=0;
125
132
137 virtual int SameTree(vtkHyperOctreeCursor *other)=0;
138
145 virtual int GetIndex(int d)=0;
146
151 virtual int GetNumberOfChildren()=0;
152
157 virtual int GetDimension()=0;
158
169 virtual void MoveToNode(int *indices,
170 int level)=0;
171
175 virtual int Found()=0;
176
177protected:
178 // Constructor.
180 ~vtkHyperOctreeCursor() VTK_OVERRIDE;
181private:
182 vtkHyperOctreeCursor(const vtkHyperOctreeCursor&) VTK_DELETE_FUNCTION;
183 void operator=(const vtkHyperOctreeCursor&) VTK_DELETE_FUNCTION;
184};
185#endif
Objects that can traverse hyperoctree nodes.
virtual int SameTree(vtkHyperOctreeCursor *other)=0
Are ‘this’ and ‘other’ pointing on the same hyperoctree?
virtual vtkHyperOctreeCursor * Clone()=0
Create a copy of ‘this’.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int CurrentIsLeaf()=0
Is the node pointed by the cursor a leaf?
virtual int GetIndex(int d)=0
Return the index in dimension ‘d’, as if the node was a cell of a uniform grid of 1<<GetCurrentLevel(...
virtual int CurrentIsTerminalNode()=0
virtual int GetCurrentLevel()=0
Return the level of the node pointed by the cursor.
~vtkHyperOctreeCursor() override
virtual int GetNumberOfChildren()=0
Return the number of children for each node of the tree.
virtual void ToSameNode(vtkHyperOctreeCursor *other)=0
Move the cursor to the same node pointed by ‘other’.
virtual void ToRoot()=0
Move the cursor the root node.
virtual void ToParent()=0
Move the cursor to the parent of the current node.
virtual int GetDimension()=0
Return the dimension of the tree.
virtual int CurrentIsRoot()=0
Is the node pointed by the cursor the root?
virtual void ToChild(int child)=0
Move the cursor to child ‘child’ of the current node.
virtual int IsEqual(vtkHyperOctreeCursor *other)=0
Is ‘this’ equal to ‘other’?
virtual int GetChildIndex()=0
Return the child number of the current node relative to its parent.
virtual void MoveToNode(int *indices, int level)=0
Move to the node described by its indices in each dimension and at a given level.
virtual int GetLeafId()=0
Return the index of the current leaf in the data arrays.
virtual int Found()=0
Did the last call to MoveToNode succeed?
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ level
Definition: vtkX3D.h:395
const int VTK_QUADTREE_CHILD_SW
const int VTK_BINARY_TREE_CHILD_LEFT
@ VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN
@ VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN
@ VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX
@ VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX
@ VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX
@ VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN
@ VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX
@ VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN
const int VTK_BINARY_TREE_CHILD_RIGHT
const int VTK_QUADTREE_CHILD_NE
const int VTK_QUADTREE_CHILD_SE
const int VTK_QUADTREE_CHILD_NW