VTK
dox/Common/vtkPlaneCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPlaneCollection.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 =========================================================================*/
00027 #ifndef __vtkPlaneCollection_h
00028 #define __vtkPlaneCollection_h
00029 
00030 #include "vtkCollection.h"
00031 
00032 #include "vtkPlane.h" // Needed for inline methods
00033 
00034 class VTK_COMMON_EXPORT vtkPlaneCollection : public vtkCollection
00035 {
00036 public:
00037   vtkTypeMacro(vtkPlaneCollection,vtkCollection);
00038   static vtkPlaneCollection *New();
00039 
00041   void AddItem(vtkPlane *);
00042 
00044   vtkPlane *GetNextItem();
00045 
00047 
00048   vtkPlane *GetItem(int i) { 
00049     return static_cast<vtkPlane *>(this->GetItemAsObject(i));}; 
00051 
00052   //BTX
00054 
00056   vtkPlane *GetNextPlane(vtkCollectionSimpleIterator &cookie);
00057   //ETX
00059 
00060 protected:
00061   vtkPlaneCollection() {};
00062   ~vtkPlaneCollection() {};
00063   
00064 
00065 private:
00066   // hide the standard AddItem from the user and the compiler.
00067   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00068 
00069 private:
00070   vtkPlaneCollection(const vtkPlaneCollection&);  // Not implemented.
00071   void operator=(const vtkPlaneCollection&);  // Not implemented.
00072 };
00073 
00074 inline void vtkPlaneCollection::AddItem(vtkPlane *f) 
00075 {
00076   this->vtkCollection::AddItem(f);
00077 }
00078 
00079 inline vtkPlane *vtkPlaneCollection::GetNextItem() 
00080 { 
00081  return static_cast<vtkPlane *>(this->GetNextItemAsObject());
00082 }
00083 
00084 #endif