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

dox/Rendering/vtkMapperCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMapperCollection.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 __vtkMapperC_h
00031 #define __vtkMapperC_h
00032 
00033 #include "vtkCollection.h"
00034 #include "vtkMapper.h" // Needed for direct access to mapper methods in 
00035                        // inline functions
00036 
00037 class VTK_RENDERING_EXPORT vtkMapperCollection : public vtkCollection
00038 {
00039  public:
00040   static vtkMapperCollection *New();
00041   vtkTypeRevisionMacro(vtkMapperCollection,vtkCollection);
00042   virtual void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   void AddItem(vtkMapper *a) {
00047     this->vtkCollection::AddItem(static_cast<vtkObject *>(a));};
00049   
00051 
00052   vtkMapper *GetNextItem() { 
00053     return static_cast<vtkMapper *>(this->GetNextItemAsObject());};
00055   
00057   vtkMapper *GetLastItem();
00058   
00059 protected:  
00060   vtkMapperCollection() {};
00061   ~vtkMapperCollection() {};
00062 
00063 private:
00064   // hide the standard AddItem from the user and the compiler.
00065   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00066 
00067 private:
00068   vtkMapperCollection(const vtkMapperCollection&);  // Not implemented.
00069   void operator=(const vtkMapperCollection&);  // Not implemented.
00070 };
00071 
00072 
00073 inline vtkMapper *vtkMapperCollection::GetLastItem() 
00074 { 
00075   if ( this->Bottom == NULL )
00076     {
00077     return NULL;
00078     }
00079   else
00080     {
00081     return static_cast<vtkMapper *>(this->Bottom->Item);
00082     }
00083 }
00084 
00085 #endif
00086 
00087 
00088 
00089 
00090