VTK
dox/Common/DataModel/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 "vtkCommonDataModelModule.h" // For export macro
00031 #include "vtkCollection.h"
00032 
00033 #include "vtkPlane.h" // Needed for inline methods
00034 
00035 class VTKCOMMONDATAMODEL_EXPORT vtkPlaneCollection : public vtkCollection
00036 {
00037 public:
00038   vtkTypeMacro(vtkPlaneCollection,vtkCollection);
00039   static vtkPlaneCollection *New();
00040 
00042   void AddItem(vtkPlane *);
00043 
00045   vtkPlane *GetNextItem();
00046 
00048 
00049   vtkPlane *GetItem(int i) {
00050     return static_cast<vtkPlane *>(this->GetItemAsObject(i));};
00052 
00053   //BTX
00055 
00057   vtkPlane *GetNextPlane(vtkCollectionSimpleIterator &cookie);
00058   //ETX
00060 
00061 protected:
00062   vtkPlaneCollection() {};
00063   ~vtkPlaneCollection() {};
00064 
00065 
00066 private:
00067   // hide the standard AddItem from the user and the compiler.
00068   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00069 
00070 private:
00071   vtkPlaneCollection(const vtkPlaneCollection&);  // Not implemented.
00072   void operator=(const vtkPlaneCollection&);  // Not implemented.
00073 };
00074 
00075 inline void vtkPlaneCollection::AddItem(vtkPlane *f)
00076 {
00077   this->vtkCollection::AddItem(f);
00078 }
00079 
00080 inline vtkPlane *vtkPlaneCollection::GetNextItem()
00081 {
00082  return static_cast<vtkPlane *>(this->GetNextItemAsObject());
00083 }
00084 
00085 #endif
00086 // VTK-HeaderTest-Exclude: vtkPlaneCollection.h