VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class vtkDataObjectTree;
20 class vtkDataSet;
21 class vtkMatrix4x4;
24 class vtkRenderWindow;
26 
27 class VTKRENDERINGVOLUMEOPENGL2_EXPORT VTK_MARSHALAUTO vtkMultiBlockUnstructuredGridVolumeMapper
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
40  double* GetBounds() override;
42 
43  void SelectScalarArray(int arrayNum) override;
44  void SelectScalarArray(char const* arrayName) override;
45  void SetScalarMode(int ScalarMode) override;
46  void SetArrayAccessMode(int accessMode) override;
47 
54  void Render(vtkRenderer* ren, vtkVolume* vol) override;
55 
60  void ReleaseGraphicsResources(vtkWindow* window) override;
62 
64 
69  void SetUseFloatingPointFrameBuffer(bool use);
70  vtkGetMacro(UseFloatingPointFrameBuffer, bool);
71 
73 
77  void SetBlendMode(int mode) override;
79 
80 protected:
83 
92 
94 
98 
99 private:
105  void LoadDataSet();
106 
115  void CreateMappers(vtkDataObjectTree* input);
116 
117  vtkDataObjectTree* GetDataObjectTreeInput();
118 
122  void ComputeBounds();
123 
127  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
128 
129  void ClearMappers();
130 
134  vtkProjectedTetrahedraMapper* CreateMapper();
135 
138  void operator=(const vtkMultiBlockUnstructuredGridVolumeMapper&) = delete;
139 
141 
142  typedef std::vector<vtkProjectedTetrahedraMapper*> MapperVec;
143  MapperVec Mappers;
144 
145  vtkMTimeType BlockLoadingTime;
146  vtkMTimeType BoundsComputeTime;
147 };
148 VTK_ABI_NAMESPACE_END
149 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:40
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:31
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
abstract specification for renderers
Definition: vtkRenderer.h:63
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:41
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()
#define VTK_MARSHALAUTO
virtual void SelectScalarArray(int arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which scalar array t...