VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkDataObjectTree;
35 class vtkDataSet;
36 class vtkImageData;
37 class vtkMatrix4x4;
39 class vtkRenderWindow;
41 
42 class VTKRENDERINGVOLUMEOPENGL2_EXPORT VTK_MARSHALAUTO vtkMultiBlockVolumeMapper
43  : public vtkVolumeMapper
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
55  double* GetBounds() override;
57 
58  void SelectScalarArray(int arrayNum) override;
59  void SelectScalarArray(char const* arrayName) override;
60  void SetScalarMode(int ScalarMode) override;
61  void SetArrayAccessMode(int accessMode) override;
62 
69  void Render(vtkRenderer* ren, vtkVolume* vol) override;
70 
75  void ReleaseGraphicsResources(vtkWindow* window) override;
77 
79 
82  void SetVectorMode(int mode);
83  vtkGetMacro(VectorMode, int);
84  void SetVectorComponent(int component);
85  vtkGetMacro(VectorComponent, int);
87 
89 
93  void SetBlendMode(int mode) override;
95 
97 
101  void SetComputeNormalFromOpacity(bool val) override;
103 
105 
108  void SetGlobalIlluminationReach(float val);
109  vtkGetMacro(GlobalIlluminationReach, float);
111 
113 
116  void SetVolumetricScatteringBlending(float val);
117  vtkGetMacro(VolumetricScatteringBlending, float);
119 
121 
125  void SetCropping(vtkTypeBool mode) override;
126 
131  double arg1, double arg2, double arg3, double arg4, double arg5, double arg6) override;
132  void SetCroppingRegionPlanes(const double* planes) override;
133 
137  void SetCroppingRegionFlags(int mode) override;
139 
141 
145  void SetRequestedRenderMode(int);
147 
149 
152  void SetTransfer2DYAxisArray(const char* a);
154 
155 protected:
157  ~vtkMultiBlockVolumeMapper() override;
158 
166  int FillInputPortInformation(int port, vtkInformation* info) override;
167 
170 
172 
173 private:
179  void LoadDataSet(vtkRenderer* ren, vtkVolume* vol);
180 
189  void CreateMappers(vtkDataObjectTree* input, vtkRenderer* ren, vtkVolume* vol);
190 
191  vtkDataObjectTree* GetDataObjectTreeInput();
192 
196  void ComputeBounds();
197 
201  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
202 
203  void ClearMappers();
204 
208  vtkSmartVolumeMapper* CreateMapper();
209 
211  void operator=(const vtkMultiBlockVolumeMapper&) = delete;
212 
214 
215  typedef std::vector<vtkSmartVolumeMapper*> MapperVec;
216  MapperVec Mappers;
217  vtkSmartVolumeMapper* FallBackMapper;
218 
219  vtkMTimeType BlockLoadingTime;
220  vtkMTimeType BoundsComputeTime;
221 
222  int VectorMode;
223  int VectorComponent;
224  int RequestedRenderMode;
225 
229  float GlobalIlluminationReach = 0.0;
230 
234  float VolumetricScatteringBlending = 0.0;
235 
236  char* Transfer2DYAxisArray;
237 };
238 VTK_ABI_NAMESPACE_END
239 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:40
Abstract class for a volume mapper.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
Adaptive volume mapper.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual void SetCroppingRegionFlags(int)
Set the flags for the cropping regions.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual void SetBlendMode(int)
Set/Get the blend mode.
abstract specification for renderers
Definition: vtkRenderer.h:63
virtual void SetScalarMode(int)
Control how the mapper works with scalar point data and cell attribute data.
Mapper to render volumes defined as vtkMultiBlockDataSet.
void Render(vtkRenderer *ren, vtkVolume *vol) override=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetArrayAccessMode(int)
Control how the mapper works with scalar point data and cell attribute data.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
virtual void SetCroppingRegionPlanes(double, double, double, double, double, double)
Set/Get the Cropping Region Planes ( xmin, xmax, ymin, ymax, zmin, zmax ) These planes are defined in...
virtual void SetCropping(vtkTypeBool)
Turn On/Off orthogonal cropping.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
create a window for renderers to draw into
Composite dataset that organizes datasets into blocks.
vtkNew< vtkMatrix4x4 > TempMatrix4x4
static vtkAlgorithm * New()
#define VTK_MARSHALAUTO
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetComputeNormalFromOpacity(bool)
If enabled, the volume(s) whose shading is enabled will use the gradient of opacity instead of the sc...