VTK  9.3.1
vtkCellGridMapper.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
19 #ifndef vtkCellGridMapper_h
20 #define vtkCellGridMapper_h
21 
22 #include "vtkMapper.h"
23 #include "vtkRenderingCoreModule.h" // For export macro.
24 #include "vtkUnsignedCharArray.h" // For API.
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkCellGrid;
28 class vtkCellAttribute;
29 class vtkDataObject;
30 class vtkRenderer;
31 
32 class VTKRENDERINGCORE_EXPORT vtkCellGridMapper : public vtkMapper
33 {
34 public:
35  static vtkCellGridMapper* New();
36  vtkTypeMacro(vtkCellGridMapper, vtkMapper);
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  vtkSetMacro(VisualizePCoords, int);
40  vtkGetMacro(VisualizePCoords, int);
41 
42  vtkSetMacro(VisualizeBasisFunction, int);
43  vtkGetMacro(VisualizeBasisFunction, int);
44 
48  void Render(vtkRenderer*, vtkActor*) override {}
49 
51 
54  void SetInputData(vtkCellGrid* in);
57 
59 
62  void Update(int port) override;
63  void Update() override;
64  vtkTypeBool Update(int port, vtkInformationVector* requests) override;
65  vtkTypeBool Update(vtkInformation* requests) override;
67 
72  double* GetBounds() VTK_SIZEHINT(6) override;
73  void GetBounds(double bounds[6]) override { this->Superclass::GetBounds(bounds); }
74 
75 protected:
77  ~vtkCellGridMapper() override = default;
78 
79  void ComputeBounds();
80  int FillInputPortInformation(int, vtkInformation*) override;
81 
83  void CreateColormapTexture();
85  virtual vtkCellAttribute* GetColorAttribute(vtkCellGrid* input) const;
86 
87  int VisualizePCoords = -1;
88  int VisualizeBasisFunction = -1;
89 
90 private:
91  vtkCellGridMapper(const vtkCellGridMapper&) = delete;
92  void operator=(const vtkCellGridMapper&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif // vtkCellGridMapper_h
void GetBounds(T a, double bds[6])
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
Store vtkAlgorithm input/output information.
abstract specification for renderers
Definition: vtkRenderer.h:61
int vtkTypeBool
Definition: vtkABI.h:64
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
void Render(vtkRenderer *, vtkActor *) override
Implemented by sub classes.
A function defined over the physical domain of a vtkCellGrid.
map a vtkCellGrid to graphics primitives.
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Update()
Bring this algorithm's outputs up-to-date.
#define VTK_SIZEHINT(...)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:76
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
vtkDataSet * GetInput()
Get the input as a vtkDataSet.
general representation of visualization data
Definition: vtkDataObject.h:54