/usr/include/vtk-6.3/vtkHyperTreeCursor.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkHyperTreeCursor.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkHyperTreeCursor - Objects that can traverse hypertree nodes.
// .SECTION Description
// Objects that can traverse hyper3TREE nodes. It is an abstract class.
// Cursors are created by the hyper3TREE.
// .SECTION See Also
// vtkDataObject vtkFieldData vtkHyper3TREEAlgorithm
// .SECTION Thanks
// This class was written by Philippe Pebay, Joachim Pouderoux and Charles Law,
// Kitware 2013
// This work was supported in part by Commissariat a l'Energie Atomique (CEA/DIF)
#ifndef vtkHyperTreeCursor_h
#define vtkHyperTreeCursor_h
#include "vtkCommonDataModelModule.h" // For export macro
#include "vtkObject.h"
enum
{
VTK_3TREE_CHILD_ZMIN_YMIN_XMIN=0,
VTK_3TREE_CHILD_ZMIN_YMIN_XMAX,
VTK_3TREE_CHILD_ZMIN_YMAX_XMIN,
VTK_3TREE_CHILD_ZMIN_YMAX_XMAX,
VTK_3TREE_CHILD_ZMAX_YMIN_XMIN,
VTK_3TREE_CHILD_ZMAX_YMIN_XMAX,
VTK_3TREE_CHILD_ZMAX_YMAX_XMIN,
VTK_3TREE_CHILD_ZMAX_YMAX_XMAX
};
const int VTK_2TREE_CHILD_SW=VTK_3TREE_CHILD_ZMIN_YMIN_XMIN;
const int VTK_2TREE_CHILD_SE=VTK_3TREE_CHILD_ZMIN_YMIN_XMAX;
const int VTK_2TREE_CHILD_NW=VTK_3TREE_CHILD_ZMIN_YMAX_XMIN;
const int VTK_2TREE_CHILD_NE=VTK_3TREE_CHILD_ZMIN_YMAX_XMAX;
const int VTK_1TREE_TREE_CHILD_LEFT=VTK_2TREE_CHILD_SW;
const int VTK_1TREE_TREE_CHILD_RIGHT=VTK_2TREE_CHILD_SE;
class vtkHyperTree;
class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeCursor : public vtkObject
{
public:
vtkTypeMacro(vtkHyperTreeCursor,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Return the HyperTree on which the cursor points to.
virtual vtkHyperTree* GetTree() = 0;
// Description:
// Return the index of the current leaf in the data arrays.
// \pre is_leaf: IsLeaf()
virtual vtkIdType GetLeafId() = 0;
// Description:
// Return the index of the current node in the data arrays.
virtual vtkIdType GetNodeId() = 0;
// Description:
// Is the node pointed by the cursor a leaf?
virtual bool IsLeaf() = 0;
// Are the children of the current node all leaves?
// This query can be called also on a leaf node.
// \post compatible: result implies !IsLeaf()
virtual bool IsTerminalNode() = 0;
// Description:
// Is the node pointed by the cursor the root?
virtual bool IsRoot() = 0;
// Description:
// Return the level of the node pointed by the cursor.
// \post positive_result: result>=0
virtual int GetCurrentLevel() = 0;
// Description:
// Return the child number of the current node relative to its parent.
// \pre not_root: !IsRoot().
// \post valid_range: result>=0 && result<GetNumberOfChildren()
virtual int GetChildIndex() = 0;
// Description:
// Move the cursor to the root node.
// \pre can be root
// \post is_root: IsRoot()
virtual void ToRoot() = 0;
// Description:
// Move the cursor to the parent of the current node.
// \pre not_root: !IsRoot()
virtual void ToParent() = 0;
// Description:
// Move the cursor to child `child' of the current node.
// \pre not_leaf: !IsLeaf()
// \pre valid_child: child>=0 && child<this->GetNumberOfChildren()
virtual void ToChild( int child ) = 0;
// Description:
// Move the cursor to the same node pointed by `other'.
// \pre other_exists: other!=0
// \pre same_hyper3TREE: this->SameTree(other);
// \post equal: this->IsEqual(other)
virtual void ToSameNode( vtkHyperTreeCursor* other ) = 0;
// Description:
// Is `this' equal to `other'?
// \pre other_exists: other!=0
// \pre same_hyper3TREE: this->SameTree(other);
virtual bool IsEqual( vtkHyperTreeCursor* other ) = 0;
// Description:
// Create a copy of `this'.
// \post results_exists:result!=0
// \post same_tree: result->SameTree(this)
virtual vtkHyperTreeCursor* Clone() = 0;
// Description:
// Are `this' and `other' pointing on the same hyper3TREE?
// \pre other_exists: other!=0
virtual int SameTree( vtkHyperTreeCursor* other ) = 0;
// Description:
// Return the index in dimension `d', as if the node was a cell of a
// uniform grid of 1<<GetCurrentLevel() cells in each dimension.
// \pre valid_range: d>=0 && d<GetDimension()
// \post valid_result: result>=0 && result<(1<<GetCurrentLevel())
virtual int GetIndex( int d ) = 0;
// Description:
// Return the number of children for each node of the tree.
// \post positive_number: result>0
virtual int GetNumberOfChildren() = 0;
// Description:
// Return the dimension of the tree.
// \post positive_result: result>0
virtual int GetDimension() = 0;
// Description:
// Move to the node described by its indices in each dimension and
// at a given level. If there is actually a node or a leaf at this
// location, Found() returns true. Otherwise, Found() returns false and the
// cursor moves to the closest parent of the query. It can be the root in the
// worst case.
// \pre indices_exists: indices!=0
// \pre valid_size: sizeof(indices)==GetDimension()
// \pre valid_level: level>=0
virtual void MoveToNode( int* indices, int level ) = 0;
// Description
// Did the last call to MoveToNode succeed?
virtual bool Found() = 0;
protected:
// Constructor.
vtkHyperTreeCursor();
virtual ~vtkHyperTreeCursor();
private:
vtkHyperTreeCursor(const vtkHyperTreeCursor&); // Not implemented.
void operator=(const vtkHyperTreeCursor&); // Not implemented.
};
#endif
|