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=========================================================================*/
27#ifndef vtkMapperCollection_h
28#define vtkMapperCollection_h
29
30#include "vtkRenderingCoreModule.h" // For export macro
31#include "vtkCollection.h"
32#include "vtkMapper.h" // Needed for direct access to mapper methods in
33 // inline functions
34
35class VTKRENDERINGCORE_EXPORT vtkMapperCollection : public vtkCollection
36{
37 public:
40 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41
46 { this->vtkCollection::AddItem(static_cast<vtkObject *>(a)); }
47
52 { return static_cast<vtkMapper *>(this->GetNextItemAsObject()); }
53
58 { return this->Bottom ? static_cast<vtkMapper*>(this->Bottom->Item) : 0; }
59
65 { return static_cast<vtkMapper *>(this->GetNextItemAsObject(cookie)); }
66
67protected:
70
71private:
72 // hide the standard AddItem from the user and the compiler.
73 void AddItem(vtkObject *o)
74 { this->vtkCollection::AddItem(o); }
75
76private:
77 vtkMapperCollection(const vtkMapperCollection&) VTK_DELETE_FUNCTION;
78 void operator=(const vtkMapperCollection&) VTK_DELETE_FUNCTION;
79};
80
81#endif
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
void AddItem(vtkObject *)
Add an object to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition: vtkIndent.h:40
a list of mappers
void AddItem(vtkMapper *a)
Add an mapper to the list.
vtkMapper * GetNextItem()
Get the next mapper in the list.
vtkMapper * GetLastItem()
Get the last mapper in the list.
static vtkMapperCollection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMapper * GetNextMapper(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
abstract base class for most VTK objects
Definition: vtkObject.h:60
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47