Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Rendering/vtkMapperCollection.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkMapperCollection.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00044 #ifndef __vtkMapperC_h
    00045 #define __vtkMapperC_h
    00046
    00047 #include "vtkCollection.h"
    00048 #include "vtkMapper.h" // Needed for direct access to mapper methods in
    00049                        // inline functions
    00050
    00051 class VTK_RENDERING_EXPORT vtkMapperCollection : public vtkCollection
    00052 {
    00053  public:
    00054   static vtkMapperCollection *New();
    00055   vtkTypeRevisionMacro(vtkMapperCollection,vtkCollection);
    00056   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00057
    00059
    00060   void AddItem(vtkMapper *a) {
    00061     this->vtkCollection::AddItem(static_cast<vtkObject *>(a));};
    00063
    00065
    00066   vtkMapper *GetNextItem() {
    00067     return static_cast<vtkMapper *>(this->GetNextItemAsObject());};
    00069
    00071   vtkMapper *GetLastItem();
    00072
    00073 protected:
    00074   vtkMapperCollection() {};
    00075   ~vtkMapperCollection() {};
    00076
    00077 private:
    00078   // hide the standard AddItem from the user and the compiler.
    00079   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
    00080
    00081 private:
    00082   vtkMapperCollection(const vtkMapperCollection&);  // Not implemented.
    00083   void operator=(const vtkMapperCollection&);  // Not implemented.
    00084 };
    00085
    00086
    00087 inline vtkMapper *vtkMapperCollection::GetLastItem()
    00088 {
    00089   if ( this->Bottom == NULL )
    00090     {
    00091     return NULL;
    00092     }
    00093   else
    00094     {
    00095     return static_cast<vtkMapper *>(this->Bottom->Item);
    00096     }
    00097 }
    00098
    00099 #endif
    00100
    00101
    00102
    00103
    00104