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

Rendering/vtkProp3DCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProp3DCollection.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 =========================================================================*/
00041 #ifndef __vtkProp3DCollection_h
00042 #define __vtkProp3DCollection_h
00043 
00044 #include "vtkPropCollection.h"
00045 #include "vtkProp3D.h" // Needed for inline methods
00046 
00047 class VTK_RENDERING_EXPORT vtkProp3DCollection : public vtkPropCollection
00048 {
00049 public:
00050   static vtkProp3DCollection *New();
00051   vtkTypeRevisionMacro(vtkProp3DCollection,vtkPropCollection);
00052   virtual void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055   void AddItem(vtkProp3D *p);
00056 
00058   vtkProp3D *GetNextProp3D();
00059 
00061   vtkProp3D *GetLastProp3D();
00062 
00063 protected:
00064   vtkProp3DCollection() {};
00065   ~vtkProp3DCollection() {};
00066     
00067 
00068 private:
00069   // hide the standard AddItem from the user and the compiler.
00070   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00071   void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
00072 
00073 private:
00074   vtkProp3DCollection(const vtkProp3DCollection&);  // Not implemented.
00075   void operator=(const vtkProp3DCollection&);  // Not implemented.
00076 };
00077 
00078 inline void vtkProp3DCollection::AddItem(vtkProp3D *a) 
00079 {
00080   this->vtkCollection::AddItem((vtkObject *)a);
00081 }
00082 
00083 inline vtkProp3D *vtkProp3DCollection::GetNextProp3D() 
00084 { 
00085   return static_cast<vtkProp3D *>(this->GetNextItemAsObject());
00086 }
00087 
00088 inline vtkProp3D *vtkProp3DCollection::GetLastProp3D() 
00089 { 
00090   if ( this->Bottom == NULL )
00091     {
00092     return NULL;
00093     }
00094   else
00095     {
00096     return static_cast<vtkProp3D *>(this->Bottom->Item);
00097     }
00098 }
00099 
00100 #endif
00101 
00102 
00103 
00104 
00105