VTK
dox/Rendering/Core/vtkRendererCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRendererCollection.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 __vtkRendererCollection_h
00027 #define __vtkRendererCollection_h
00028 
00029 #include "vtkRenderingCoreModule.h" // For export macro
00030 #include "vtkCollection.h"
00031 #include "vtkRenderer.h" // Needed for static cast
00032 
00033 class VTKRENDERINGCORE_EXPORT vtkRendererCollection : public vtkCollection
00034 {
00035 public:
00036   static vtkRendererCollection *New();
00037   vtkTypeMacro(vtkRendererCollection, vtkCollection);
00038   virtual void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041 
00042   void AddItem(vtkRenderer *a)
00043     { this->vtkCollection::AddItem(a); }
00045 
00046 
00048 
00050   vtkRenderer *GetNextItem()
00051     { return static_cast<vtkRenderer *>(this->GetNextItemAsObject()); }
00053 
00055   void Render();
00056 
00059   vtkRenderer *GetFirstRenderer();
00060 
00061   //BTX
00063 
00065   vtkRenderer *GetNextRenderer(vtkCollectionSimpleIterator &cookie)
00066     { return static_cast<vtkRenderer *>(this->GetNextItemAsObject(cookie)); }
00067   //ETX
00069 
00070 protected:
00071   vtkRendererCollection() {}
00072   ~vtkRendererCollection() {}
00073 
00074 private:
00075   // hide the standard AddItem from the user and the compiler.
00076   void AddItem(vtkObject *o)
00077     { this->vtkCollection::AddItem(o); }
00078 
00079   vtkRendererCollection(const vtkRendererCollection&);  // Not implemented.
00080   void operator=(const vtkRendererCollection&);  // Not implemented.
00081 };
00082 
00083 #endif