00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTransformCollection.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 =========================================================================*/ 00042 #ifndef __vtkTransformCollection_h 00043 #define __vtkTransformCollection_h 00044 00045 #include "vtkCollection.h" 00046 00047 #include "vtkTransform.h" // Needed for inline methods 00048 00049 class VTK_COMMON_EXPORT vtkTransformCollection : public vtkCollection 00050 { 00051 public: 00052 vtkTypeRevisionMacro(vtkTransformCollection,vtkCollection); 00053 static vtkTransformCollection *New(); 00054 00056 void AddItem(vtkTransform *); 00057 00060 vtkTransform *GetNextItem(); 00061 00062 //BTX 00064 00066 vtkTransform *GetNextTransform(vtkCollectionSimpleIterator &cookie) { 00067 return static_cast<vtkTransform *>(this->GetNextItemAsObject(cookie));}; 00068 //ETX 00070 00071 protected: 00072 vtkTransformCollection() {}; 00073 ~vtkTransformCollection() {}; 00074 00075 00076 private: 00077 // hide the standard AddItem from the user and the compiler. 00078 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00079 00080 private: 00081 vtkTransformCollection(const vtkTransformCollection&); // Not implemented. 00082 void operator=(const vtkTransformCollection&); // Not implemented. 00083 }; 00084 00085 //---------------------------------------------------------------------------- 00086 inline void vtkTransformCollection::AddItem(vtkTransform *t) 00087 { 00088 this->vtkCollection::AddItem((vtkObject *)t); 00089 } 00090 00091 //---------------------------------------------------------------------------- 00092 inline vtkTransform *vtkTransformCollection::GetNextItem() 00093 { 00094 return static_cast<vtkTransform *>(this->GetNextItemAsObject()); 00095 } 00096 00097 #endif