VTK  9.4.20251007
vtkPolyDataMapper2D.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
26
27#ifndef vtkPolyDataMapper2D_h
28#define vtkPolyDataMapper2D_h
29
30#include "vtkMapper2D.h"
31#include "vtkRenderingCoreModule.h" // For export macro
32#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33
34VTK_ABI_NAMESPACE_BEGIN
35class vtkCoordinate;
36class vtkPolyData;
39
40class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkPolyDataMapper2D : public vtkMapper2D
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
54
56
62
68
70
75 vtkBooleanMacro(ScalarVisibility, vtkTypeBool);
77
79
92 vtkSetMacro(ColorMode, int);
93 vtkGetMacro(ColorMode, int);
98
102 const char* GetColorModeAsString();
103
105
117
119
124 vtkSetVector2Macro(ScalarRange, double);
125 vtkGetVectorMacro(ScalarRange, double, 2);
127
129
141 vtkSetMacro(ScalarMode, int);
142 vtkGetMacro(ScalarMode, int);
154
155
157
160 void ColorByArrayComponent(int arrayNum, int component);
161 void ColorByArrayComponent(const char* arrayName, int component);
163
167 const char* GetArrayName() { return this->ArrayName; }
168 int GetArrayId() { return this->ArrayId; }
169 int GetArrayAccessMode() { return this->ArrayAccessMode; }
170 int GetArrayComponent() { return this->ArrayComponent; }
171
177
179
188
190
196 vtkBooleanMacro(TransformCoordinateUseDouble, bool);
198
207
212
213protected:
216
218
220
224 double ScalarRange[2];
228
231
232 // for coloring by a component of a field data array
234 char ArrayName[256];
237
238private:
240 void operator=(const vtkPolyDataMapper2D&) = delete;
241};
242
243VTK_ABI_NAMESPACE_END
244#endif
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
Store vtkAlgorithm input/output information.
vtkMapper2D()=default
vtkPolyData * GetInput()
Set the input to the mapper.
vtkScalarsToColors * LookupTable
const char * GetArrayName()
Get the array name or number and component to color by.
void SetInputData(vtkPolyData *in)
Set the input to the mapper.
void SetScalarModeToUsePointData()
Control how the filter works with scalar point data and cell attribute data.
void SetScalarModeToUseCellData()
Control how the filter works with scalar point data and cell attribute data.
static vtkPolyDataMapper2D * New()
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
void ColorByArrayComponent(const char *arrayName, int component)
Choose which component of which field data array to color by.
void SetScalarModeToDefault()
Control how the filter works with scalar point data and cell attribute data.
const char * GetColorModeAsString()
Return the method of coloring scalar data.
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
virtual void SetScalarMode(int)
Control how the filter works with scalar point data and cell attribute data.
vtkUnsignedCharArray * Colors
virtual void SetTransformCoordinate(vtkCoordinate *)
Specify a vtkCoordinate object to be used to transform the vtkPolyData point coordinates.
vtkTypeBool UseLookupTableScalarRange
~vtkPolyDataMapper2D() override
void ColorByArrayComponent(int arrayNum, int component)
Choose which component of which field data array to color by.
void SetColorModeToDirectScalars()
Control how the scalar data is mapped to colors.
void SetScalarModeToUsePointFieldData()
Control how the filter works with scalar point data and cell attribute data.
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkScalarsToColors * GetLookupTable()
Specify a lookup table for the mapper to use.
virtual void CreateDefaultLookupTable()
Create default lookup table.
void SetScalarModeToUseCellFieldData()
Control how the filter works with scalar point data and cell attribute data.
void SetColorModeToDefault()
Control how the scalar data is mapped to colors.
vtkCoordinate * TransformCoordinate
void SetColorModeToMapScalars()
Control how the scalar data is mapped to colors.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnsignedCharArray * MapScalars(double alpha)
Map the scalars (if there are any scalars and ScalarVisibility is on) through the lookup table,...
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
Superclass for mapping scalar values to colors.
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SCALAR_MODE_DEFAULT
#define VTK_SCALAR_MODE_USE_POINT_DATA
#define VTK_SCALAR_MODE_USE_CELL_DATA
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_MARSHALAUTO