VTK
|
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 "vtkRenderingLabelModule.h" // For export macro 00031 #include "vtkObject.h" 00032 #include "vtkStdString.h" // for std string 00033 #include "vtkUnicodeString.h" // for unicode string 00034 00035 class vtkIdTypeArray; 00036 class vtkLabelHierarchy; 00037 class vtkPolyData; 00038 00039 class VTKRENDERINGLABEL_EXPORT vtkLabelHierarchyIterator : public vtkObject 00040 { 00041 public: 00042 vtkTypeMacro(vtkLabelHierarchyIterator,vtkObject); 00043 virtual void PrintSelf( ostream& os, vtkIndent indent ); 00044 00049 virtual void Begin( vtkIdTypeArray* ) { } 00050 00052 virtual void Next() { } 00053 00055 virtual bool IsAtEnd() { return true; } 00056 00058 virtual void GetPoint( double x[3] ); 00059 00061 virtual void GetSize( double sz[2] ); 00062 00064 virtual void GetBoundedSize( double sz[2] ); 00065 00067 virtual int GetType(); 00068 00070 virtual vtkStdString GetLabel(); 00071 00073 virtual vtkUnicodeString GetUnicodeLabel(); 00074 00076 virtual double GetOrientation(); 00077 00079 virtual vtkIdType GetLabelId() { return -1; } 00080 00082 00083 vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy); 00085 00088 virtual void SetTraversedBounds( vtkPolyData* ); 00089 00093 virtual void GetNodeGeometry( double ctr[3], double& size ) = 0; 00094 00098 virtual void BoxNode(); 00099 00104 virtual void BoxAllNodes( vtkPolyData* ); 00105 00107 00110 vtkSetMacro(AllBounds,int); 00111 vtkGetMacro(AllBounds,int); 00113 00114 protected: 00115 vtkLabelHierarchyIterator(); 00116 virtual ~vtkLabelHierarchyIterator(); 00117 00118 void BoxNodeInternal3( const double* ctr, double sz ); 00119 void BoxNodeInternal2( const double* ctr, double sz ); 00120 00122 virtual void SetHierarchy( vtkLabelHierarchy* h ); 00123 00124 vtkLabelHierarchy* Hierarchy; 00125 vtkPolyData* TraversedBounds; 00126 double BoundsFactor; 00127 int AllBounds; 00128 int AllBoundsRecorded; 00129 00130 private: 00131 vtkLabelHierarchyIterator( const vtkLabelHierarchyIterator& ); // Not implemented. 00132 void operator = ( const vtkLabelHierarchyIterator& ); // Not implemented. 00133 }; 00134 00135 #endif // __vtkLabelHierarchyIterator_h