00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkLabelHierarchyIterator.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00027 #ifndef __vtkLabelHierarchyIterator_h 00028 #define __vtkLabelHierarchyIterator_h 00029 00030 #include "vtkObject.h" 00031 #include "vtkStdString.h" // for std string 00032 #include "vtkUnicodeString.h" // for unicode string 00033 00034 class vtkIdTypeArray; 00035 class vtkLabelHierarchy; 00036 class vtkPolyData; 00037 00038 class VTK_RENDERING_EXPORT vtkLabelHierarchyIterator : public vtkObject 00039 { 00040 public: 00041 vtkTypeMacro(vtkLabelHierarchyIterator,vtkObject); 00042 virtual void PrintSelf( ostream& os, vtkIndent indent ); 00043 00048 virtual void Begin( vtkIdTypeArray* ) { } 00049 00051 virtual void Next() { } 00052 00054 virtual bool IsAtEnd() { return true; } 00055 00057 virtual void GetPoint( double x[3] ); 00058 00060 virtual void GetSize( double sz[2] ); 00061 00063 virtual void GetBoundedSize( double sz[2] ); 00064 00066 virtual int GetType(); 00067 00068 //BTX 00070 virtual vtkStdString GetLabel(); 00071 00073 00074 virtual vtkUnicodeString GetUnicodeLabel(); 00075 //ETX 00077 00079 virtual double GetOrientation(); 00080 00082 virtual vtkIdType GetLabelId() { return -1; } 00083 00085 00086 vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy); 00088 00091 virtual void SetTraversedBounds( vtkPolyData* ); 00092 00096 virtual void GetNodeGeometry( double ctr[3], double& size ) = 0; 00097 00101 virtual void BoxNode(); 00102 00107 virtual void BoxAllNodes( vtkPolyData* ); 00108 00110 00113 vtkSetMacro(AllBounds,int); 00114 vtkGetMacro(AllBounds,int); 00116 00117 protected: 00118 vtkLabelHierarchyIterator(); 00119 virtual ~vtkLabelHierarchyIterator(); 00120 00121 void BoxNodeInternal3( const double* ctr, double sz ); 00122 void BoxNodeInternal2( const double* ctr, double sz ); 00123 00125 virtual void SetHierarchy( vtkLabelHierarchy* h ); 00126 00127 vtkLabelHierarchy* Hierarchy; 00128 vtkPolyData* TraversedBounds; 00129 double BoundsFactor; 00130 int AllBounds; 00131 int AllBoundsRecorded; 00132 00133 private: 00134 vtkLabelHierarchyIterator( const vtkLabelHierarchyIterator& ); // Not implemented. 00135 void operator = ( const vtkLabelHierarchyIterator& ); // Not implemented. 00136 }; 00137 00138 #endif // __vtkLabelHierarchyIterator_h