VTK  9.3.1
vtkAbstractMapper.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 vtkAbstractMapper_h
20 #define vtkAbstractMapper_h
21 
22 #include "vtkAlgorithm.h"
23 #include "vtkRenderingCoreModule.h" // For export macro
24 
25 #define VTK_SCALAR_MODE_DEFAULT 0
26 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
27 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
28 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
29 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
30 #define VTK_SCALAR_MODE_USE_FIELD_DATA 5
31 
32 #define VTK_GET_ARRAY_BY_ID 0
33 #define VTK_GET_ARRAY_BY_NAME 1
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkAbstractArray;
37 class vtkDataSet;
38 class vtkPlane;
39 class vtkPlaneCollection;
40 class vtkPlanes;
41 class vtkTimerLog;
43 class vtkWindow;
44 
45 class VTKRENDERINGCORE_EXPORT vtkAbstractMapper : public vtkAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  vtkMTimeType GetMTime() override;
55 
62 
64 
67  vtkGetMacro(TimeToDraw, double);
69 
71 
75  void AddClippingPlane(vtkPlane* plane);
76  void RemoveClippingPlane(vtkPlane* plane);
77  void RemoveAllClippingPlanes();
79 
81 
85  virtual void SetClippingPlanes(vtkPlaneCollection*);
86  vtkGetObjectMacro(ClippingPlanes, vtkPlaneCollection);
88 
93  void SetClippingPlanes(vtkPlanes* planes);
94 
98  virtual void ShallowCopy(vtkAbstractMapper* m);
99 
108  static vtkDataArray* GetScalars(vtkDataSet* input, int scalarMode, int arrayAccessMode,
109  int arrayId, const char* arrayName, int& cellFlag);
110 
120  static vtkAbstractArray* GetAbstractScalars(vtkDataSet* input, int scalarMode,
121  int arrayAccessMode, int arrayId, const char* arrayName, int& cellFlag);
122 
135  static vtkUnsignedCharArray* GetGhostArray(
136  vtkDataSet* input, int scalarMode, unsigned char& ghostsToSkip);
137 
141  int GetNumberOfClippingPlanes();
142 
143 protected:
145  ~vtkAbstractMapper() override;
146 
148  double TimeToDraw;
149  vtkWindow* LastWindow; // Window used for the previous render
151 
152 private:
153  vtkAbstractMapper(const vtkAbstractMapper&) = delete;
154  void operator=(const vtkAbstractMapper&) = delete;
155 };
156 
157 VTK_ABI_NAMESPACE_END
158 #endif
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
Abstract superclass for all arrays.
maintain a list of planes
implicit function for convex set of planes
Definition: vtkPlanes.h:41
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlaneCollection * ClippingPlanes
Timer support and logging.
Definition: vtkTimerLog.h:84
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:25
dynamic, self-adjusting array of unsigned char
abstract class specifies interface to map data
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.