VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMapperCollection.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 =========================================================================*/ 00026 #ifndef __vtkMapperCollection_h 00027 #define __vtkMapperCollection_h 00028 00029 #include "vtkRenderingCoreModule.h" // For export macro 00030 #include "vtkCollection.h" 00031 #include "vtkMapper.h" // Needed for direct access to mapper methods in 00032 // inline functions 00033 00034 class VTKRENDERINGCORE_EXPORT vtkMapperCollection : public vtkCollection 00035 { 00036 public: 00037 static vtkMapperCollection *New(); 00038 vtkTypeMacro(vtkMapperCollection, vtkCollection); 00039 virtual void PrintSelf(ostream& os, vtkIndent indent); 00040 00042 00043 void AddItem(vtkMapper *a) 00044 { this->vtkCollection::AddItem(static_cast<vtkObject *>(a)); } 00046 00048 00049 vtkMapper *GetNextItem() 00050 { return static_cast<vtkMapper *>(this->GetNextItemAsObject()); } 00052 00054 00055 vtkMapper *GetLastItem() 00056 { return this->Bottom ? static_cast<vtkMapper*>(this->Bottom->Item) : 0; } 00058 00059 //BTX 00061 00063 vtkMapper *GetNextMapper(vtkCollectionSimpleIterator &cookie) 00064 { return static_cast<vtkMapper *>(this->GetNextItemAsObject(cookie)); } 00065 //ETX 00067 00068 protected: 00069 vtkMapperCollection() {} 00070 ~vtkMapperCollection() {} 00071 00072 private: 00073 // hide the standard AddItem from the user and the compiler. 00074 void AddItem(vtkObject *o) 00075 { this->vtkCollection::AddItem(o); } 00076 00077 private: 00078 vtkMapperCollection(const vtkMapperCollection&); // Not implemented. 00079 void operator=(const vtkMapperCollection&); // Not implemented. 00080 }; 00081 00082 #endif