VTK  9.4.20241221
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
24VTK_ABI_NAMESPACE_BEGIN
25class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkVolumeCollection : public vtkPropCollection
26{
27public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
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
59protected:
61 ~vtkVolumeCollection() override = default;
62
63private:
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
72VTK_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
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:130
void * vtkCollectionSimpleIterator
#define VTK_MARSHALAUTO