VTK  9.2.6
vtkAbstractMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractMapper.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 =========================================================================*/
31 #ifndef vtkAbstractMapper_h
32 #define vtkAbstractMapper_h
33 
34 #include "vtkAlgorithm.h"
35 #include "vtkRenderingCoreModule.h" // For export macro
36 
37 #define VTK_SCALAR_MODE_DEFAULT 0
38 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
39 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
40 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
41 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
42 #define VTK_SCALAR_MODE_USE_FIELD_DATA 5
43 
44 #define VTK_GET_ARRAY_BY_ID 0
45 #define VTK_GET_ARRAY_BY_NAME 1
46 
47 class vtkAbstractArray;
48 class vtkDataSet;
49 class vtkPlane;
50 class vtkPlaneCollection;
51 class vtkPlanes;
52 class vtkTimerLog;
54 class vtkWindow;
55 
56 class VTKRENDERINGCORE_EXPORT vtkAbstractMapper : public vtkAlgorithm
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
65  vtkMTimeType GetMTime() override;
66 
73 
75 
78  vtkGetMacro(TimeToDraw, double);
80 
82 
86  void AddClippingPlane(vtkPlane* plane);
87  void RemoveClippingPlane(vtkPlane* plane);
88  void RemoveAllClippingPlanes();
90 
92 
96  virtual void SetClippingPlanes(vtkPlaneCollection*);
97  vtkGetObjectMacro(ClippingPlanes, vtkPlaneCollection);
99 
104  void SetClippingPlanes(vtkPlanes* planes);
105 
109  virtual void ShallowCopy(vtkAbstractMapper* m);
110 
119  static vtkDataArray* GetScalars(vtkDataSet* input, int scalarMode, int arrayAccessMode,
120  int arrayId, const char* arrayName, int& cellFlag);
121 
131  static vtkAbstractArray* GetAbstractScalars(vtkDataSet* input, int scalarMode,
132  int arrayAccessMode, int arrayId, const char* arrayName, int& cellFlag);
133 
146  static vtkUnsignedCharArray* GetGhostArray(
147  vtkDataSet* input, int scalarMode, unsigned char& ghostsToSkip);
148 
152  int GetNumberOfClippingPlanes();
153 
154 protected:
156  ~vtkAbstractMapper() override;
157 
159  double TimeToDraw;
160  vtkWindow* LastWindow; // Window used for the previous render
162 
163 private:
164  vtkAbstractMapper(const vtkAbstractMapper&) = delete;
165  void operator=(const vtkAbstractMapper&) = delete;
166 };
167 
168 #endif
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Abstract superclass for all arrays.
maintain a list of planes
implicit function for convex set of planes
Definition: vtkPlanes.h:52
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:95
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:36
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.