VTK  9.3.20240419
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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21 
22 #include "vtkVolume.h" // Needed for static cast
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkVolumeCollection : public vtkPropCollection
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
35  void AddItem(vtkVolume* a) { this->vtkCollection::AddItem(a); }
36 
41  vtkVolume* GetNextVolume() { return static_cast<vtkVolume*>(this->GetNextItemAsObject()); }
42 
48  vtkVolume* GetNextItem() { return this->GetNextVolume(); }
49 
55  {
56  return static_cast<vtkVolume*>(this->GetNextItemAsObject(cookie));
57  }
58 
59 protected:
60  vtkVolumeCollection() = default;
61  ~vtkVolumeCollection() override = default;
62 
63 private:
64  // hide the standard AddItem from the user and the compiler.
65  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
66  void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
67 
69  void operator=(const vtkVolumeCollection&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #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:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
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:66
an ordered list of volumes
vtkVolumeCollection()=default
vtkVolume * GetNextVolume()
Get the next Volume in the list.
vtkVolume * GetNextVolume(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
~vtkVolumeCollection() override=default
static vtkVolumeCollection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddItem(vtkVolume *a)
Add a Volume to the bottom of the list.
vtkVolume * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:120
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:41
#define VTK_MARSHALAUTO