VTK  9.3.20240418
vtkMultiBlockUnstructuredGridVolumeMapper.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
8 #ifndef vtkMultiBlockUnstructuredGridVolumeMapper_h
9 #define vtkMultiBlockUnstructuredGridVolumeMapper_h
10 
11 #include <vector> // For DataBlocks
12 
13 #include "vtkNew.h" // for ivars
14 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
16 
17 VTK_ABI_NAMESPACE_BEGIN
18 class vtkDataObjectTree;
19 class vtkDataSet;
20 class vtkMatrix4x4;
23 class vtkRenderWindow;
25 
26 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockUnstructuredGridVolumeMapper
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
39  double* GetBounds() override;
41 
42  void SelectScalarArray(int arrayNum) override;
43  void SelectScalarArray(char const* arrayName) override;
44  void SetScalarMode(int ScalarMode) override;
45  void SetArrayAccessMode(int accessMode) override;
46 
53  void Render(vtkRenderer* ren, vtkVolume* vol) override;
54 
59  void ReleaseGraphicsResources(vtkWindow* window) override;
61 
63 
69  vtkGetMacro(UseFloatingPointFrameBuffer, bool);
70 
72 
76  void SetBlendMode(int mode) override;
78 
79 protected:
82 
91 
93 
97 
98 private:
104  void LoadDataSet();
105 
114  void CreateMappers(vtkDataObjectTree* input);
115 
116  vtkDataObjectTree* GetDataObjectTreeInput();
117 
121  void ComputeBounds();
122 
126  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
127 
128  void ClearMappers();
129 
133  vtkProjectedTetrahedraMapper* CreateMapper();
134 
137  void operator=(const vtkMultiBlockUnstructuredGridVolumeMapper&) = delete;
138 
140 
141  typedef std::vector<vtkProjectedTetrahedraMapper*> MapperVec;
142  MapperVec Mappers;
143 
144  vtkMTimeType BlockLoadingTime;
145  vtkMTimeType BoundsComputeTime;
146 };
147 VTK_ABI_NAMESPACE_END
148 #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:166
a simple class to control print indentation
Definition: vtkIndent.h:108
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:141
Composite dataset that organizes datasets into blocks.
Mapper to render volumes defined as vtkMultiBlockDataSet.
void ReleaseGraphicsResources(vtkWindow *window) override
void SetUseFloatingPointFrameBuffer(bool use)
Set/get whether to use floating-point rendering buffers rather than the default.
void SetBlendMode(int mode) override
blending mode api from vtkUnstructuredGridVolumemapper
static vtkMultiBlockUnstructuredGridVolumeMapper * New()
double * GetBounds() override
API Superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Specify the type of data this mapper can handle.
void SetScalarMode(int ScalarMode) override
API Superclass.
void SetArrayAccessMode(int accessMode) override
API Superclass.
void Render(vtkRenderer *ren, vtkVolume *vol) override
Render the current dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SelectScalarArray(int arrayNum) override
API Superclass.
void SelectScalarArray(char const *arrayName) override
API Superclass.
Unstructured grid volume renderer.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:172
Abstract class for an unstructured grid volume mapper.
dataset represents arbitrary combinations of all possible cell types
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:120
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
@ info
Definition: vtkX3D.h:376
@ mode
Definition: vtkX3D.h:247
@ port
Definition: vtkX3D.h:447
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270