VTK
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 "vtkRenderingCoreModule.h" // For export macro
35 #include "vtkAlgorithm.h"
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;
53 class vtkWindow;
54 
55 class VTKRENDERINGCORE_EXPORT vtkAbstractMapper : public vtkAlgorithm
56 {
57 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
64  vtkMTimeType GetMTime() override;
65 
72 
74 
77  vtkGetMacro( TimeToDraw, double );
79 
81 
85  void AddClippingPlane(vtkPlane *plane);
89 
91 
96  vtkGetObjectMacro(ClippingPlanes, vtkPlaneCollection);
98 
104 
108  virtual void ShallowCopy(vtkAbstractMapper *m);
109 
118  static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode,
119  int arrayAccessMode, int arrayId,
120  const char *arrayName, int& cellFlag);
121 
131  static vtkAbstractArray *GetAbstractScalars(vtkDataSet *input, int scalarMode,
132  int arrayAccessMode, int arrayId,
133  const char *arrayName, int& cellFlag);
134 
139 
140 protected:
142  ~vtkAbstractMapper() override;
143 
145  double TimeToDraw;
146  vtkWindow *LastWindow; // Window used for the previous render
148 
149 private:
150  vtkAbstractMapper(const vtkAbstractMapper&) = delete;
151  void operator=(const vtkAbstractMapper&) = delete;
152 };
153 
154 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:38
vtkAbstractMapper::GetScalars
static vtkDataArray * GetScalars(vtkDataSet *input, int scalarMode, int arrayAccessMode, int arrayId, const char *arrayName, int &cellFlag)
Internal helper function for getting the active scalars.
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
vtkAbstractMapper::GetMTime
vtkMTimeType GetMTime() override
Override Modifiedtime as we have added Clipping planes.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkPlanes
implicit function for convex set of planes
Definition: vtkPlanes.h:56
vtkAbstractMapper::LastWindow
vtkWindow * LastWindow
Definition: vtkAbstractMapper.h:146
vtkAbstractMapper::AddClippingPlane
void AddClippingPlane(vtkPlane *plane)
Specify clipping planes to be applied when the data is mapped (at most 6 clipping planes can be speci...
vtkAbstractMapper::TimeToDraw
double TimeToDraw
Definition: vtkAbstractMapper.h:145
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkAlgorithm.h
vtkAbstractMapper::GetNumberOfClippingPlanes
int GetNumberOfClippingPlanes()
Get the number of clipping planes.
vtkAbstractMapper::vtkAbstractMapper
vtkAbstractMapper()
vtkAbstractMapper::ClippingPlanes
vtkPlaneCollection * ClippingPlanes
Definition: vtkAbstractMapper.h:147
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAbstractMapper::GetAbstractScalars
static vtkAbstractArray * GetAbstractScalars(vtkDataSet *input, int scalarMode, int arrayAccessMode, int arrayId, const char *arrayName, int &cellFlag)
Internal helper function for getting the active scalars as an abstract array.
vtkAbstractMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractMapper::ShallowCopy
virtual void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
vtkAbstractMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Definition: vtkAbstractMapper.h:71
vtkAbstractMapper::Timer
vtkTimerLog * Timer
Definition: vtkAbstractMapper.h:144
vtkAbstractMapper::RemoveClippingPlane
void RemoveClippingPlane(vtkPlane *plane)
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
vtkAbstractMapper::~vtkAbstractMapper
~vtkAbstractMapper() override
vtkTimerLog
Timer support and logging.
Definition: vtkTimerLog.h:92
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:37
vtkAbstractMapper::RemoveAllClippingPlanes
void RemoveAllClippingPlanes()
vtkAbstractMapper::SetClippingPlanes
virtual void SetClippingPlanes(vtkPlaneCollection *)
Get/Set the vtkPlaneCollection which specifies the clipping planes.
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:56
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkAbstractMapper::SetClippingPlanes
void SetClippingPlanes(vtkPlanes *planes)
An alternative way to set clipping planes: use up to six planes found in the supplied instance of the...