VTK: Rendering/VolumeOpenGL2/vtkMultiBlockVolumeMapper.h Source File

| VTK 9.3.1

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
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataObjectTree;
34 class vtkDataSet;
35 class vtkImageData;
36 class vtkMatrix4x4;
37 class vtkMultiBlockDataSet;
38 class vtkRenderWindow;
39 class vtkSmartVolumeMapper;
40
41 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : public vtkVolumeMapper
42 {
43 public:
44 static vtkMultiBlockVolumeMapper* New();
45 vtkTypeMacro(vtkMultiBlockVolumeMapper, vtkVolumeMapper);
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
53 double* GetBounds() override;
54 using vtkAbstractVolumeMapper::GetBounds;
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
106 void SetGlobalIlluminationReach(float val);
107 vtkGetMacro(GlobalIlluminationReach, float);
109
111
114 void SetVolumetricScatteringBlending(float val);
115 vtkGetMacro(VolumetricScatteringBlending, float);
117
119
123 void SetCropping(vtkTypeBool mode) override;
124
128 void SetCroppingRegionPlanes(
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
143 void SetRequestedRenderMode(int);
145
147
150 void SetTransfer2DYAxisArray(const char* a);
152
153 protected:
154 vtkMultiBlockVolumeMapper();
155 ~vtkMultiBlockVolumeMapper() override;
156
164 int FillInputPortInformation(int port, vtkInformation* info) override;
165
166 vtkRenderWindow* DebugWin;
167 vtkRenderer* DebugRen;
168
169 vtkNew<vtkMatrix4x4> TempMatrix4x4;
170
171 private:
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
208 vtkMultiBlockVolumeMapper(const vtkMultiBlockVolumeMapper&) = delete;
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 };
236 VTK_ABI_NAMESPACE_END
237 #endif
vtkAbstractVolumeMapper::GetBounds
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
vtkDataObjectTree
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
Definition: vtkDataObjectTree.h:49
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:50
vtkMultiBlockVolumeMapper
Mapper to render volumes defined as vtkMultiBlockDataSet.
Definition: vtkMultiBlockVolumeMapper.h:42
vtkMultiBlockVolumeMapper::SetCropping
void SetCropping(vtkTypeBool mode) override
Cropping API from vtkVolumeMapper.
vtkMultiBlockVolumeMapper::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Specify the type of data this mapper can handle.
vtkMultiBlockVolumeMapper::GetBounds
double * GetBounds() override
API Superclass.
vtkMultiBlockVolumeMapper::New
static vtkMultiBlockVolumeMapper * New()
vtkMultiBlockVolumeMapper::SetComputeNormalFromOpacity
void SetComputeNormalFromOpacity(bool val) override
ComputeNormalFromOpacity exposed.
vtkMultiBlockVolumeMapper::SetBlendMode
void SetBlendMode(int mode) override
Blending mode API from vtkVolumeMapper.
vtkMultiBlockVolumeMapper::SetVectorMode
void SetVectorMode(int mode)
VectorMode interface exposed from vtkSmartVolumeMapper.
vtkMultiBlockVolumeMapper::SetRequestedRenderMode
void SetRequestedRenderMode(int)
Forwarded to internal vtkSmartVolumeMappers used.
vtkMultiBlockVolumeMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiBlockVolumeMapper::DebugWin
vtkRenderWindow * DebugWin
Definition: vtkMultiBlockVolumeMapper.h:166
vtkMultiBlockVolumeMapper::TempMatrix4x4
vtkNew< vtkMatrix4x4 > TempMatrix4x4
Definition: vtkMultiBlockVolumeMapper.h:169
vtkMultiBlockVolumeMapper::SetCroppingRegionFlags
void SetCroppingRegionFlags(int mode) override
vtkMultiBlockVolumeMapper::SetArrayAccessMode
void SetArrayAccessMode(int accessMode) override
API Superclass.
vtkMultiBlockVolumeMapper::SetCroppingRegionPlanes
void SetCroppingRegionPlanes(double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override
vtkMultiBlockVolumeMapper::Render
void Render(vtkRenderer *ren, vtkVolume *vol) override
Render the current dataset.
vtkMultiBlockVolumeMapper::SetTransfer2DYAxisArray
void SetTransfer2DYAxisArray(const char *a)
vtkMultiBlockVolumeMapper::SetVectorComponent
void SetVectorComponent(int component)
VectorMode interface exposed from vtkSmartVolumeMapper.
vtkMultiBlockVolumeMapper::vtkMultiBlockVolumeMapper
vtkMultiBlockVolumeMapper()
vtkMultiBlockVolumeMapper::SetVolumetricScatteringBlending
void SetVolumetricScatteringBlending(float val)
This parameter controls the blending between surfacic approximation and volumetric multi-scattering.
vtkMultiBlockVolumeMapper::SelectScalarArray
void SelectScalarArray(char const *arrayName) override
API Superclass.
vtkMultiBlockVolumeMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *window) override
vtkMultiBlockVolumeMapper::SetGlobalIlluminationReach
void SetGlobalIlluminationReach(float val)
This parameter acts as a balance between localness and globalness of shadows.
vtkMultiBlockVolumeMapper::SetCroppingRegionPlanes
void SetCroppingRegionPlanes(const double *planes) override
Cropping API from vtkVolumeMapper.
vtkMultiBlockVolumeMapper::SetScalarMode
void SetScalarMode(int ScalarMode) override
API Superclass.
vtkMultiBlockVolumeMapper::~vtkMultiBlockVolumeMapper
~vtkMultiBlockVolumeMapper() override
vtkMultiBlockVolumeMapper::DebugRen
vtkRenderer * DebugRen
Definition: vtkMultiBlockVolumeMapper.h:167
vtkMultiBlockVolumeMapper::SelectScalarArray
void SelectScalarArray(int arrayNum) override
API Superclass.
vtkNew< vtkMatrix4x4 >
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:95
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkSmartVolumeMapper
Adaptive volume mapper.
Definition: vtkSmartVolumeMapper.h:92
vtkVolumeMapper
Abstract class for a volume mapper.
Definition: vtkVolumeMapper.h:37
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkX3D::component
@ component
Definition: vtkX3D.h:175
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::mode
@ mode
Definition: vtkX3D.h:247
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkNew.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
vtkVolumeMapper.h