VTK  9.7.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 #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:
28  static vtkVolumeCollection* New();
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
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:35
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:52
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 given item to the bottom (end) of the collection.
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
#define VTK_MARSHALAUTO
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.