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

vtkRendererCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRendererCollection.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 =========================================================================*/
00039 #ifndef __vtkRendererCollection_h
00040 #define __vtkRendererCollection_h
00041 
00042 #include "vtkCollection.h"
00043 #include "vtkRenderer.h" // Needed for static cast
00044 
00045 class VTK_RENDERING_EXPORT vtkRendererCollection : public vtkCollection
00046 {
00047  public:
00048   static vtkRendererCollection *New();
00049   vtkTypeRevisionMacro(vtkRendererCollection,vtkCollection);
00050   virtual void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00054   void AddItem(vtkRenderer *a) {
00055     this->vtkCollection::AddItem((vtkObject *)a);};
00057   
00059 
00061   vtkRenderer *GetNextItem() {
00062     return static_cast<vtkRenderer *>(this->GetNextItemAsObject());};
00064 
00066   void Render();
00067 
00070   vtkRenderer *GetFirstRenderer();
00071 
00072   //BTX
00074 
00076   vtkRenderer *GetNextRenderer(vtkCollectionSimpleIterator &cookie) {
00077     return static_cast<vtkRenderer *>(this->GetNextItemAsObject(cookie));};
00078   //ETX
00080 
00081 protected:  
00082   vtkRendererCollection() {};
00083   ~vtkRendererCollection() {};
00084 
00085 private:
00086   // hide the standard AddItem from the user and the compiler.
00087   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00088 
00089 private:
00090   vtkRendererCollection(const vtkRendererCollection&);  // Not implemented.
00091   void operator=(const vtkRendererCollection&);  // Not implemented.
00092 };
00093 
00094 
00095 #endif