00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkLabelHierarchyIterator.h,v $ 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 00031 #include "vtkObject.h" 00032 00033 class vtkIdTypeArray; 00034 class vtkLabelHierarchy; 00035 class vtkPolyData; 00036 00037 class VTK_RENDERING_EXPORT vtkLabelHierarchyIterator : public vtkObject 00038 { 00039 public: 00040 vtkTypeRevisionMacro(vtkLabelHierarchyIterator,vtkObject); 00041 virtual void PrintSelf( ostream& os, vtkIndent indent ); 00042 00047 virtual void Begin( vtkIdTypeArray* ) { } 00048 00050 virtual void Next() { } 00051 00053 virtual bool IsAtEnd() { return true; } 00054 00056 virtual void GetPoint( double x[3] ); 00057 00059 virtual void GetSize( double sz[2] ); 00060 00062 virtual int GetType(); 00063 00065 virtual vtkIdType GetLabelId() { return -1; } 00066 00069 virtual void SetTraversedBounds( vtkPolyData* ); 00070 00074 virtual void GetNodeGeometry( double ctr[3], double& size ) = 0; 00075 00079 virtual void BoxNode(); 00080 00085 virtual void BoxAllNodes( vtkPolyData* ); 00086 00088 00091 vtkSetMacro(AllBounds,int); 00092 vtkGetMacro(AllBounds,int); 00094 00095 protected: 00096 vtkLabelHierarchyIterator(); 00097 virtual ~vtkLabelHierarchyIterator(); 00098 00099 void BoxNodeInternal3( const double* ctr, double sz ); 00100 void BoxNodeInternal2( const double* ctr, double sz ); 00101 00103 virtual void SetHierarchy( vtkLabelHierarchy* h ); 00104 00105 vtkLabelHierarchy* Hierarchy; 00106 vtkPolyData* TraversedBounds; 00107 double BoundsFactor; 00108 int AllBounds; 00109 int AllBoundsRecorded; 00110 00111 private: 00112 vtkLabelHierarchyIterator( const vtkLabelHierarchyIterator& ); // Not implemented. 00113 void operator = ( const vtkLabelHierarchyIterator& ); // Not implemented. 00114 }; 00115 00116 #endif // __vtkLabelHierarchyIterator_h