VTK  9.3.1
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 
68  void SetUseFloatingPointFrameBuffer(bool use);
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
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
abstract specification for renderers
Definition: vtkRenderer.h:61
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...
Mapper to render volumes defined as vtkMultiBlockDataSet.
virtual void SetScalarMode(int)
Control how the mapper works with scalar point data and cell attribute data.
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void SetBlendMode(int)
virtual void SetArrayAccessMode(int)
Control how the mapper works with scalar point data and cell attribute data.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
a simple class to control print indentation
Definition: vtkIndent.h:28
Unstructured grid volume renderer.
Abstract class for an unstructured grid volume mapper.
dataset represents arbitrary combinations of all possible cell types
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
create a window for renderers to draw into
Composite dataset that organizes datasets into blocks.
static vtkAlgorithm * New()
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...