VTK
dox/Rendering/Core/vtkProp3DCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkProp3DCollection.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 =========================================================================*/
00029 #ifndef __vtkProp3DCollection_h
00030 #define __vtkProp3DCollection_h
00031 
00032 #include "vtkRenderingCoreModule.h" // For export macro
00033 #include "vtkPropCollection.h"
00034 #include "vtkProp3D.h" // Needed for inline methods
00035 
00036 class VTKRENDERINGCORE_EXPORT vtkProp3DCollection : public vtkPropCollection
00037 {
00038 public:
00039   static vtkProp3DCollection *New();
00040   vtkTypeMacro(vtkProp3DCollection,vtkPropCollection);
00041   virtual void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044   void AddItem(vtkProp3D *p);
00045 
00047   vtkProp3D *GetNextProp3D();
00048 
00050   vtkProp3D *GetLastProp3D();
00051 
00052   //BTX
00054 
00056   vtkProp3D *GetNextProp3D(vtkCollectionSimpleIterator &cookie)
00057     {
00058       return static_cast<vtkProp3D *>(this->GetNextItemAsObject(cookie));
00059     }
00060   //ETX
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)
00071     {
00072       this->vtkCollection::AddItem(o);
00073     }
00074   void AddItem(vtkProp *o)
00075     {
00076       this->vtkPropCollection::AddItem(o);
00077     }
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(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