VTK  9.2.6
vtkMultiBlockVolumeMapper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMultiBlockVolumeMapper.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
35#ifndef vtkMultiBlockVolumeMapper_h
36#define vtkMultiBlockVolumeMapper_h
37
38#include <vector> // For DataBlocks
39
40#include "vtkNew.h" // for ivar
41#include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
42#include "vtkVolumeMapper.h"
43
45class vtkDataSet;
46class vtkImageData;
47class vtkMatrix4x4;
49class vtkRenderWindow;
51
52class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockVolumeMapper : public vtkVolumeMapper
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
64 double* GetBounds() override;
66
67 void SelectScalarArray(int arrayNum) override;
68 void SelectScalarArray(char const* arrayName) override;
69 void SetScalarMode(int ScalarMode) override;
70 void SetArrayAccessMode(int accessMode) override;
71
78 void Render(vtkRenderer* ren, vtkVolume* vol) override;
79
84 void ReleaseGraphicsResources(vtkWindow* window) override;
86
88
91 void SetVectorMode(int mode);
92 vtkGetMacro(VectorMode, int);
93 void SetVectorComponent(int component);
94 vtkGetMacro(VectorComponent, int);
96
98
102 void SetBlendMode(int mode) override;
104
106
110 void SetComputeNormalFromOpacity(bool val) override;
112
114
118 vtkGetMacro(GlobalIlluminationReach, float);
120
122
126 vtkGetMacro(VolumetricScatteringBlending, float);
128
130
134 void SetCropping(vtkTypeBool mode) override;
135
140 double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
141 void SetCroppingRegionPlanes(const double* planes) override;
142
146 void SetCroppingRegionFlags(int mode) override;
148
150
156
158
161 void SetTransfer2DYAxisArray(const char* a);
163
164protected:
167
175 int FillInputPortInformation(int port, vtkInformation* info) override;
176
179
181
182private:
188 void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
189
198 void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
199
200 vtkDataObjectTree* GetDataObjectTreeInput();
201
205 void ComputeBounds();
206
210 void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
211
212 void ClearMappers();
213
217 vtkSmartVolumeMapper* CreateMapper();
218
220 void operator=(const vtkMultiBlockVolumeMapper&) = delete;
221
223
224 typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
225 MapperVec Mappers;
226 vtkSmartVolumeMapper* FallBackMapper;
227
228 vtkMTimeType BlockLoadingTime;
229 vtkMTimeType BoundsComputeTime;
230
231 int VectorMode;
232 int VectorComponent;
233 int RequestedRenderMode;
234
238 float GlobalIlluminationReach = 0.0;
239
243 float VolumetricScatteringBlending = 0.0;
244
245 char* Transfer2DYAxisArray;
246};
247#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:63
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:40
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Composite dataset that organizes datasets into blocks.
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:62
create a window for renderers to draw into
abstract specification for renderers
Definition vtkRenderer.h:73
Adaptive volume mapper.
represents a volume (data & properties) in a rendered scene
Definition vtkVolume.h:51
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287