Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkActor2DCollection.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkActor2DCollection.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00030 #ifndef __vtkActor2DCollection_h 00031 #define __vtkActor2DCollection_h 00032 00033 #include "vtkPropCollection.h" 00034 00035 #include "vtkActor2D.h" // Needed for inline methods 00036 00037 class vtkViewport; 00038 00039 class VTK_COMMON_EXPORT vtkActor2DCollection : public vtkPropCollection 00040 { 00041 public: 00044 static vtkActor2DCollection *New(); 00045 00046 vtkTypeRevisionMacro(vtkActor2DCollection,vtkPropCollection); 00047 00050 void Sort(); 00051 00054 void AddItem(vtkActor2D *a); 00055 00057 00058 int IsItemPresent(vtkActor2D *a); 00059 vtkActor2D *GetNextActor2D(); 00060 vtkActor2D *GetLastActor2D(); 00062 00064 00067 vtkActor2D *GetNextItem(); 00068 vtkActor2D *GetLastItem(); 00070 00071 00073 void RenderOverlay(vtkViewport* viewport); 00074 00075 00076 protected: 00077 vtkActor2DCollection() {}; 00078 ~vtkActor2DCollection(); 00079 00080 virtual void DeleteElement(vtkCollectionElement *); 00081 00082 private: 00083 // hide the standard AddItem from the user and the compiler. 00084 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00085 void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); }; 00086 int IsItemPresent(vtkObject *o) { return this->vtkCollection::IsItemPresent(o); }; 00087 00088 private: 00089 vtkActor2DCollection(const vtkActor2DCollection&); // Not implemented. 00090 void operator=(const vtkActor2DCollection&); // Not implemented. 00091 }; 00092 00093 inline int vtkActor2DCollection::IsItemPresent(vtkActor2D *a) 00094 { 00095 return this->vtkCollection::IsItemPresent((vtkObject *)a); 00096 } 00097 00098 inline vtkActor2D *vtkActor2DCollection::GetNextActor2D() 00099 { 00100 return static_cast<vtkActor2D *>(this->GetNextItemAsObject()); 00101 } 00102 00103 inline vtkActor2D *vtkActor2DCollection::GetLastActor2D() 00104 { 00105 if ( this->Bottom == NULL ) 00106 { 00107 return NULL; 00108 } 00109 else 00110 { 00111 return static_cast<vtkActor2D *>(this->Bottom->Item); 00112 } 00113 } 00114 00115 inline vtkActor2D *vtkActor2DCollection::GetNextItem() 00116 { 00117 return this->GetNextActor2D(); 00118 } 00119 00120 inline vtkActor2D *vtkActor2DCollection::GetLastItem() 00121 { 00122 return this->GetLastActor2D(); 00123 } 00124 00125 #endif 00126 00127 00128 00129 00130