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 
31 enum
32 {
41 };
42 
47 
50 
51 class VTKCOMMONDATAMODEL_EXPORT vtkHyperOctreeCursor : public vtkObject
52 {
53 public:
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 
177 protected:
178  // Constructor.
180  ~vtkHyperOctreeCursor() VTK_OVERRIDE;
181 private:
182  vtkHyperOctreeCursor(const vtkHyperOctreeCursor&) VTK_DELETE_FUNCTION;
183  void operator=(const vtkHyperOctreeCursor&) VTK_DELETE_FUNCTION;
184 };
185 #endif
vtkHyperOctreeCursor::GetDimension
virtual int GetDimension()=0
Return the dimension of the tree.
vtkHyperOctreeCursor::IsEqual
virtual int IsEqual(vtkHyperOctreeCursor *other)=0
Is ‘this’ equal to ‘other’?
vtkHyperOctreeCursor::CurrentIsTerminalNode
virtual int CurrentIsTerminalNode()=0
vtkHyperOctreeCursor
Objects that can traverse hyperoctree nodes.
Definition: vtkHyperOctreeCursor.h:52
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX
@ VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX
Definition: vtkHyperOctreeCursor.h:34
VTK_QUADTREE_CHILD_SE
const int VTK_QUADTREE_CHILD_SE
Definition: vtkHyperOctreeCursor.h:44
vtkHyperOctreeCursor::GetNumberOfChildren
virtual int GetNumberOfChildren()=0
Return the number of children for each node of the tree.
VTK_QUADTREE_CHILD_NW
const int VTK_QUADTREE_CHILD_NW
Definition: vtkHyperOctreeCursor.h:45
vtkHyperOctreeCursor::SameTree
virtual int SameTree(vtkHyperOctreeCursor *other)=0
Are ‘this’ and ‘other’ pointing on the same hyperoctree?
vtkX3D::level
@ level
Definition: vtkX3D.h:395
VTK_BINARY_TREE_CHILD_LEFT
const int VTK_BINARY_TREE_CHILD_LEFT
Definition: vtkHyperOctreeCursor.h:48
VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN
@ VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN
Definition: vtkHyperOctreeCursor.h:35
vtkHyperOctreeCursor::vtkHyperOctreeCursor
vtkHyperOctreeCursor()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
VTK_QUADTREE_CHILD_SW
const int VTK_QUADTREE_CHILD_SW
Definition: vtkHyperOctreeCursor.h:43
VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX
@ VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX
Definition: vtkHyperOctreeCursor.h:38
vtkHyperOctreeCursor::Clone
virtual vtkHyperOctreeCursor * Clone()=0
Create a copy of ‘this’.
vtkHyperOctreeCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperOctreeCursor::ToParent
virtual void ToParent()=0
Move the cursor to the parent of the current node.
vtkHyperOctreeCursor::CurrentIsLeaf
virtual int CurrentIsLeaf()=0
Is the node pointed by the cursor a leaf?
vtkHyperOctreeCursor::ToSameNode
virtual void ToSameNode(vtkHyperOctreeCursor *other)=0
Move the cursor to the same node pointed by ‘other’.
vtkHyperOctreeCursor::GetChildIndex
virtual int GetChildIndex()=0
Return the child number of the current node relative to its parent.
VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX
@ VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX
Definition: vtkHyperOctreeCursor.h:36
vtkObject.h
vtkHyperOctreeCursor::ToRoot
virtual void ToRoot()=0
Move the cursor the root node.
vtkHyperOctreeCursor::CurrentIsRoot
virtual int CurrentIsRoot()=0
Is the node pointed by the cursor the root?
VTK_BINARY_TREE_CHILD_RIGHT
const int VTK_BINARY_TREE_CHILD_RIGHT
Definition: vtkHyperOctreeCursor.h:49
VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN
@ VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN
Definition: vtkHyperOctreeCursor.h:33
vtkHyperOctreeCursor::GetCurrentLevel
virtual int GetCurrentLevel()=0
Return the level of the node pointed by the cursor.
vtkHyperOctreeCursor::Found
virtual int Found()=0
Did the last call to MoveToNode succeed?
vtkHyperOctreeCursor::GetIndex
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(...
vtkHyperOctreeCursor::MoveToNode
virtual void MoveToNode(int *indices, int level)=0
Move to the node described by its indices in each dimension and at a given level.
vtkHyperOctreeCursor::~vtkHyperOctreeCursor
~vtkHyperOctreeCursor() override
vtkHyperOctreeCursor::ToChild
virtual void ToChild(int child)=0
Move the cursor to child ‘child’ of the current node.
VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN
@ VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN
Definition: vtkHyperOctreeCursor.h:37
VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX
@ VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX
Definition: vtkHyperOctreeCursor.h:40
VTK_QUADTREE_CHILD_NE
const int VTK_QUADTREE_CHILD_NE
Definition: vtkHyperOctreeCursor.h:46
VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN
@ VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN
Definition: vtkHyperOctreeCursor.h:39
vtkHyperOctreeCursor::GetLeafId
virtual int GetLeafId()=0
Return the index of the current leaf in the data arrays.