VTK  9.2.5
vtkMultiBlockUnstructuredGridVolumeMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiBlockUnstructuredGridVolumeMapper.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 =========================================================================*/
20 #ifndef vtkMultiBlockUnstructuredGridVolumeMapper_h
21 #define vtkMultiBlockUnstructuredGridVolumeMapper_h
22 
23 #include <vector> // For DataBlocks
24 
25 #include "vtkNew.h" // for ivars
26 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
28 
29 class vtkDataObjectTree;
30 class vtkDataSet;
31 class vtkMatrix4x4;
34 class vtkRenderWindow;
36 
37 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkMultiBlockUnstructuredGridVolumeMapper
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  double* GetBounds() override;
52 
53  void SelectScalarArray(int arrayNum) override;
54  void SelectScalarArray(char const* arrayName) override;
55  void SetScalarMode(int ScalarMode) override;
56  void SetArrayAccessMode(int accessMode) override;
57 
64  void Render(vtkRenderer* ren, vtkVolume* vol) override;
65 
70  void ReleaseGraphicsResources(vtkWindow* window) override;
72 
74 
80  vtkGetMacro(UseFloatingPointFrameBuffer, bool);
81 
83 
87  void SetBlendMode(int mode) override;
89 
90 protected:
93 
102 
104 
108 
109 private:
115  void LoadDataSet();
116 
125  void CreateMappers(vtkDataObjectTree* input);
126 
127  vtkDataObjectTree* GetDataObjectTreeInput();
128 
132  void ComputeBounds();
133 
137  void SortMappers(vtkRenderer* ren, vtkMatrix4x4* volumeMat);
138 
139  void ClearMappers();
140 
144  vtkProjectedTetrahedraMapper* CreateMapper();
145 
148  void operator=(const vtkMultiBlockUnstructuredGridVolumeMapper&) = delete;
149 
151 
152  typedef std::vector<vtkProjectedTetrahedraMapper*> MapperVec;
153  MapperVec Mappers;
154 
155  vtkMTimeType BlockLoadingTime;
156  vtkMTimeType BoundsComputeTime;
157 };
158 #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:172
a simple class to control print indentation
Definition: vtkIndent.h:119
Store vtkAlgorithm input/output information.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:151
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:182
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:140
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
@ info
Definition: vtkX3D.h:382
@ mode
Definition: vtkX3D.h:253
@ port
Definition: vtkX3D.h:453
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287