VTK  9.3.1
vtkVolumeCollection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkVolumeCollection_h
16 #define vtkVolumeCollection_h
17 
18 #include "vtkPropCollection.h"
19 #include "vtkRenderingCoreModule.h" // For export macro
20 
21 #include "vtkVolume.h" // Needed for static cast
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKRENDERINGCORE_EXPORT vtkVolumeCollection : public vtkPropCollection
25 {
26 public:
27  static vtkVolumeCollection* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
34  void AddItem(vtkVolume* a) { this->vtkCollection::AddItem(a); }
35 
40  vtkVolume* GetNextVolume() { return static_cast<vtkVolume*>(this->GetNextItemAsObject()); }
41 
47  vtkVolume* GetNextItem() { return this->GetNextVolume(); }
48 
54  {
55  return static_cast<vtkVolume*>(this->GetNextItemAsObject(cookie));
56  }
57 
58 protected:
59  vtkVolumeCollection() = default;
60  ~vtkVolumeCollection() override = default;
61 
62 private:
63  // hide the standard AddItem from the user and the compiler.
64  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
65  void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
66 
68  void operator=(const vtkVolumeCollection&) = delete;
69 };
70 
71 VTK_ABI_NAMESPACE_END
72 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:39
abstract base class for most VTK objects
Definition: vtkObject.h:51
vtkVolume * GetNextVolume(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVolume * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
an ordered list of Props
a simple class to control print indentation
Definition: vtkIndent.h:28
an ordered list of volumes
vtkVolume * GetNextVolume()
Get the next Volume in the list.
void AddItem(vtkObject *)
Add an object to the bottom of the list.
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
static vtkPropCollection * New()
void AddItem(vtkVolume *a)
Add a Volume to the bottom of the list.