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

vtkProp3DCollection.h

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