VTK  9.1.0
vtkVolumeCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkVolumeCollection.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 vtkVolumeCollection_h
28#define vtkVolumeCollection_h
29
30#include "vtkPropCollection.h"
31#include "vtkRenderingCoreModule.h" // For export macro
32
33#include "vtkVolume.h" // Needed for static cast
34
35class VTKRENDERINGCORE_EXPORT vtkVolumeCollection : public vtkPropCollection
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46
51 vtkVolume* GetNextVolume() { return static_cast<vtkVolume*>(this->GetNextItemAsObject()); }
52
58 vtkVolume* GetNextItem() { return this->GetNextVolume(); }
59
65 {
66 return static_cast<vtkVolume*>(this->GetNextItemAsObject(cookie));
67 }
68
69protected:
71 ~vtkVolumeCollection() override = default;
72
73private:
74 // hide the standard AddItem from the user and the compiler.
75 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
76 void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
77
78private:
80 void operator=(const vtkVolumeCollection&) = delete;
81};
82
83#endif
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
an ordered list of Props
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
an ordered list of volumes
vtkVolume * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
vtkVolumeCollection()=default
~vtkVolumeCollection() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVolume * GetNextVolume(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkVolume * GetNextVolume()
Get the next Volume in the list.
void AddItem(vtkVolume *a)
Add a Volume to the bottom of the list.
static vtkVolumeCollection * New()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:134
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48