VTK  9.3.0
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
23VTK_ABI_NAMESPACE_BEGIN
24class VTKRENDERINGCORE_EXPORT vtkVolumeCollection : public vtkPropCollection
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
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
58protected:
60 ~vtkVolumeCollection() override = default;
61
62private:
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
71VTK_ABI_NAMESPACE_END
72#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:29
abstract base class for most VTK objects
Definition vtkObject.h:49
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:43
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:40
void * vtkCollectionSimpleIterator