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

vtkActorCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkActorCollection.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 =========================================================================*/
00026 #ifndef __vtkActorC_h
00027 #define __vtkActorC_h
00028 
00029 #include "vtkPropCollection.h"
00030 #include "vtkActor.h" // For inline methods
00031 
00032 class vtkProperty;
00033 
00034 class VTK_RENDERING_EXPORT vtkActorCollection : public vtkPropCollection
00035 {
00036 public:
00037   static vtkActorCollection *New();
00038   vtkTypeRevisionMacro(vtkActorCollection,vtkPropCollection);
00039   virtual void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042   void AddItem(vtkActor *a);
00043 
00045   vtkActor *GetNextActor();
00046 
00048   vtkActor *GetLastActor();
00049 
00051 
00054   vtkActor *GetNextItem();
00055   vtkActor *GetLastItem();
00057 
00059   void ApplyProperties(vtkProperty *p); 
00060 
00061   //BTX
00063 
00065   vtkActor *GetNextActor(vtkCollectionSimpleIterator &cookie) {
00066     return static_cast<vtkActor *>(this->GetNextItemAsObject(cookie));};
00067   //ETX
00069 
00070 protected:
00071   vtkActorCollection() {};
00072   ~vtkActorCollection() {};
00073     
00074 
00075 private:
00076   // hide the standard AddItem from the user and the compiler.
00077   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00078   void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
00079 
00080 private:
00081   vtkActorCollection(const vtkActorCollection&);  // Not implemented.
00082   void operator=(const vtkActorCollection&);  // Not implemented.
00083 };
00084 
00085 inline void vtkActorCollection::AddItem(vtkActor *a) 
00086 {
00087   this->vtkCollection::AddItem((vtkObject *)a);
00088 }
00089 
00090 inline vtkActor *vtkActorCollection::GetNextActor() 
00091 { 
00092   return static_cast<vtkActor *>(this->GetNextItemAsObject());
00093 }
00094 
00095 inline vtkActor *vtkActorCollection::GetLastActor() 
00096 { 
00097   if ( this->Bottom == NULL )
00098     {
00099     return NULL;
00100     }
00101   else
00102     {
00103     return static_cast<vtkActor *>(this->Bottom->Item);
00104     }
00105 }
00106 
00107 inline vtkActor *vtkActorCollection::GetNextItem() 
00108 { 
00109   return this->GetNextActor();
00110 }
00111 
00112 inline vtkActor *vtkActorCollection::GetLastItem() 
00113 {
00114   return this->GetLastActor();
00115 }
00116 
00117 #endif
00118 
00119 
00120 
00121 
00122 

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530