VTK
vtkMapperCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMapperCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef __vtkMapperCollection_h
27 #define __vtkMapperCollection_h
28 
29 #include "vtkRenderingCoreModule.h" // For export macro
30 #include "vtkCollection.h"
31 #include "vtkMapper.h" // Needed for direct access to mapper methods in
32  // inline functions
33 
34 class VTKRENDERINGCORE_EXPORT vtkMapperCollection : public vtkCollection
35 {
36  public:
37  static vtkMapperCollection *New();
39  virtual void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
43  void AddItem(vtkMapper *a) {
44  this->vtkCollection::AddItem(static_cast<vtkObject *>(a));};
46 
48 
50  return static_cast<vtkMapper *>(this->GetNextItemAsObject());};
52 
54  vtkMapper *GetLastItem();
55 
56  //BTX
58 
61  return static_cast<vtkMapper *>(this->GetNextItemAsObject(cookie));};
62  //ETX
64 
65 protected:
68 
69 private:
70  // hide the standard AddItem from the user and the compiler.
71  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
72 
73 private:
74  vtkMapperCollection(const vtkMapperCollection&); // Not implemented.
75  void operator=(const vtkMapperCollection&); // Not implemented.
76 };
77 
78 
80 {
81  if ( this->Bottom == NULL )
82  {
83  return NULL;
84  }
85  else
86  {
87  return static_cast<vtkMapper *>(this->Bottom->Item);
88  }
89 }
90 
91 #endif
92 
93 
94 
95 
96