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 "vtkCollection.h"
30 #include "vtkMapper.h" // Needed for direct access to mapper methods in
31  // inline functions
32 
34 {
35  public:
36  static vtkMapperCollection *New();
38  virtual void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
42  void AddItem(vtkMapper *a) {
43  this->vtkCollection::AddItem(static_cast<vtkObject *>(a));};
45 
47 
49  return static_cast<vtkMapper *>(this->GetNextItemAsObject());};
51 
53  vtkMapper *GetLastItem();
54 
55  //BTX
57 
60  return static_cast<vtkMapper *>(this->GetNextItemAsObject(cookie));};
61  //ETX
63 
64 protected:
67 
68 private:
69  // hide the standard AddItem from the user and the compiler.
70  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
71 
72 private:
73  vtkMapperCollection(const vtkMapperCollection&); // Not implemented.
74  void operator=(const vtkMapperCollection&); // Not implemented.
75 };
76 
77 
79 {
80  if ( this->Bottom == NULL )
81  {
82  return NULL;
83  }
84  else
85  {
86  return static_cast<vtkMapper *>(this->Bottom->Item);
87  }
88 }
89 
90 #endif
91 
92 
93 
94 
95 
a list of mappers
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:60
void PrintSelf(ostream &os, vtkIndent indent)
vtkMapper * GetNextMapper(vtkCollectionSimpleIterator &cookie)
a simple class to control print indentation
Definition: vtkIndent.h:37
static vtkCollection * New()
void AddItem(vtkMapper *a)
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:85
vtkCollectionElement * Bottom
#define VTK_RENDERING_EXPORT
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkObject * GetNextItemAsObject()