VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
25 
26 #define VTK_SCALAR_MODE_DEFAULT 0
27 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
28 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
29 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
30 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
31 #define VTK_SCALAR_MODE_USE_FIELD_DATA 5
32 
33 #define VTK_GET_ARRAY_BY_ID 0
34 #define VTK_GET_ARRAY_BY_NAME 1
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkAbstractArray;
38 class vtkDataSet;
39 class vtkPlane;
40 class vtkPlaneCollection;
41 class vtkPlanes;
42 class vtkTimerLog;
44 class vtkWindow;
45 
46 class VTKRENDERINGCORE_EXPORT VTK_MARSHALMANUAL vtkAbstractMapper : public vtkAlgorithm
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
55  vtkMTimeType GetMTime() override;
56 
63 
65 
68  vtkGetMacro(TimeToDraw, double);
70 
72 
76  void AddClippingPlane(vtkPlane* plane);
77  void RemoveClippingPlane(vtkPlane* plane);
78  void RemoveAllClippingPlanes();
80 
82 
86  virtual void SetClippingPlanes(vtkPlaneCollection*);
87  vtkGetObjectMacro(ClippingPlanes, vtkPlaneCollection);
89 
94  void SetClippingPlanes(vtkPlanes* planes);
95 
99  virtual void ShallowCopy(vtkAbstractMapper* m);
100 
109  static vtkDataArray* GetScalars(vtkDataSet* input, int scalarMode, int arrayAccessMode,
110  int arrayId, const char* arrayName, int& cellFlag);
111 
121  static vtkAbstractArray* GetAbstractScalars(vtkDataSet* input, int scalarMode,
122  int arrayAccessMode, int arrayId, const char* arrayName, int& cellFlag);
123 
136  static vtkUnsignedCharArray* GetGhostArray(
137  vtkDataSet* input, int scalarMode, unsigned char& ghostsToSkip);
138 
142  int GetNumberOfClippingPlanes();
143 
144 protected:
146  ~vtkAbstractMapper() override;
147 
149  double TimeToDraw;
150  vtkWindow* LastWindow; // Window used for the previous render
152 
153 private:
154  vtkAbstractMapper(const vtkAbstractMapper&) = delete;
155  void operator=(const vtkAbstractMapper&) = delete;
156 };
157 
158 VTK_ABI_NAMESPACE_END
159 #endif
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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:85
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
#define VTK_MARSHALMANUAL
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:31
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.