VTK  9.0.20200809
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 
35 class VTKRENDERINGCORE_EXPORT vtkVolumeCollection : public vtkPropCollection
36 {
37 public:
38  static vtkVolumeCollection* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
45  void AddItem(vtkVolume* a) { this->vtkCollection::AddItem(a); }
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 
69 protected:
70  vtkVolumeCollection() = default;
71  ~vtkVolumeCollection() override = default;
72 
73 private:
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 
78 private:
80  void operator=(const vtkVolumeCollection&) = delete;
81 };
82 
83 #endif
vtkVolume.h
vtkVolumeCollection
an ordered list of volumes
Definition: vtkVolumeCollection.h:35
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
vtkVolumeCollection::GetNextItem
vtkVolume * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
Definition: vtkVolumeCollection.h:58
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkVolumeCollection::GetNextVolume
vtkVolume * GetNextVolume(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkVolumeCollection.h:64
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:179
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPropCollection::AddItem
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
Definition: vtkPropCollection.h:86
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkVolumeCollection::GetNextVolume
vtkVolume * GetNextVolume()
Get the next Volume in the list.
Definition: vtkVolumeCollection.h:51
vtkPropCollection::New
static vtkPropCollection * New()
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkVolumeCollection::AddItem
void AddItem(vtkVolume *a)
Add a Volume to the bottom of the list.
Definition: vtkVolumeCollection.h:45
vtkCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkPropCollection.h