VTK  9.4.20241218
vtkMultiBlockVolumeMapper.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
23#ifndef vtkMultiBlockVolumeMapper_h
24#define vtkMultiBlockVolumeMapper_h
25
26#include <vector> // For DataBlocks
27
28#include "vtkNew.h" // for ivar
29#include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
30#include "vtkVolumeMapper.h"
31
32VTK_ABI_NAMESPACE_BEGIN
34class vtkDataSet;
35class vtkImageData;
36class vtkMatrix4x4;
38class vtkRenderWindow;
40
41class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : public vtkVolumeMapper
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
53 double* GetBounds() override;
55
56 void SelectScalarArray(int arrayNum) override;
57 void SelectScalarArray(char const* arrayName) override;
58 void SetScalarMode(int ScalarMode) override;
59 void SetArrayAccessMode(int accessMode) override;
60
67 void Render(vtkRenderer* ren, vtkVolume* vol) override;
68
73 void ReleaseGraphicsResources(vtkWindow* window) override;
75
77
80 void SetVectorMode(int mode);
81 vtkGetMacro(VectorMode, int);
82 void SetVectorComponent(int component);
83 vtkGetMacro(VectorComponent, int);
85
87
91 void SetBlendMode(int mode) override;
93
95
99 void SetComputeNormalFromOpacity(bool val) override;
101
103
107 vtkGetMacro(GlobalIlluminationReach, float);
109
111
115 vtkGetMacro(VolumetricScatteringBlending, float);
117
119
123 void SetCropping(vtkTypeBool mode) override;
124
129 double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
130 void SetCroppingRegionPlanes(const double* planes) override;
131
135 void SetCroppingRegionFlags(int mode) override;
137
139
145
147
150 void SetTransfer2DYAxisArray(const char* a);
152
153protected:
156
164 int FillInputPortInformation(int port, vtkInformation* info) override;
165
168
170
171private:
177 void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
178
187 void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
188
189 vtkDataObjectTree* GetDataObjectTreeInput();
190
194 void ComputeBounds();
195
199 void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
200
201 void ClearMappers();
202
206 vtkSmartVolumeMapper* CreateMapper();
207
209 void operator=(const vtkMultiBlockVolumeMapper&) = delete;
210
212
213 typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
214 MapperVec Mappers;
215 vtkSmartVolumeMapper* FallBackMapper;
216
217 vtkMTimeType BlockLoadingTime;
218 vtkMTimeType BoundsComputeTime;
219
220 int VectorMode;
221 int VectorComponent;
222 int RequestedRenderMode;
223
227 float GlobalIlluminationReach = 0.0;
228
232 float VolumetricScatteringBlending = 0.0;
233
234 char* Transfer2DYAxisArray;
235};
236VTK_ABI_NAMESPACE_END
237#endif
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Composite dataset that organizes datasets into blocks.
Mapper to render volumes defined as vtkMultiBlockDataSet.
void SetCropping(vtkTypeBool mode) override
Cropping API from vtkVolumeMapper.
int FillInputPortInformation(int port, vtkInformation *info) override
Specify the type of data this mapper can handle.
void SetComputeNormalFromOpacity(bool val) override
ComputeNormalFromOpacity exposed.
void SetBlendMode(int mode) override
Blending mode API from vtkVolumeMapper.
void SetVectorMode(int mode)
VectorMode interface exposed from vtkSmartVolumeMapper.
void SetRequestedRenderMode(int)
Forwarded to internal vtkSmartVolumeMappers used.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCroppingRegionFlags(int mode) override
void SetArrayAccessMode(int accessMode) override
API Superclass.
void SetCroppingRegionPlanes(double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override
void Render(vtkRenderer *ren, vtkVolume *vol) override
Render the current dataset.
void SetTransfer2DYAxisArray(const char *a)
void SetVectorComponent(int component)
VectorMode interface exposed from vtkSmartVolumeMapper.
void SetVolumetricScatteringBlending(float val)
This parameter controls the blending between surfacic approximation and volumetric multi-scattering.
void SelectScalarArray(char const *arrayName) override
API Superclass.
void ReleaseGraphicsResources(vtkWindow *window) override
void SetGlobalIlluminationReach(float val)
This parameter acts as a balance between localness and globalness of shadows.
void SetCroppingRegionPlanes(const double *planes) override
Cropping API from vtkVolumeMapper.
void SetScalarMode(int ScalarMode) override
API Superclass.
double * GetBounds() override
API Superclass.
~vtkMultiBlockVolumeMapper() override
static vtkMultiBlockVolumeMapper * New()
void SelectScalarArray(int arrayNum) override
API Superclass.
Allocate and hold a VTK object.
Definition vtkNew.h:167
create a window for renderers to draw into
abstract specification for renderers
Adaptive volume mapper.
Abstract class for a volume mapper.
represents a volume (data & properties) in a rendered scene
Definition vtkVolume.h:130
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270