VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPolyDataMapper2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataMapper2D.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 =========================================================================*/
38 #ifndef __vtkPolyDataMapper2D_h
39 #define __vtkPolyDataMapper2D_h
40 
41 
42 #include "vtkRenderingCoreModule.h" // For export macro
43 #include "vtkMapper2D.h"
44 
45 class vtkCoordinate;
46 class vtkPolyData;
47 class vtkScalarsToColors;
49 
51 {
52 public:
54  static vtkPolyDataMapper2D *New();
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
59  void SetInputData(vtkPolyData *in);
60  vtkPolyData *GetInput();
62 
64 
65  void SetLookupTable(vtkScalarsToColors *lut);
66  vtkScalarsToColors *GetLookupTable();
68 
71  virtual void CreateDefaultLookupTable();
72 
74 
76  vtkSetMacro(ScalarVisibility, int);
77  vtkGetMacro(ScalarVisibility, int);
78  vtkBooleanMacro(ScalarVisibility, int);
80 
82 
89  vtkSetMacro(ColorMode, int);
90  vtkGetMacro(ColorMode, int);
91  void SetColorModeToDefault();
92  void SetColorModeToMapScalars();
94 
96  const char *GetColorModeAsString();
97 
99 
105  vtkSetMacro(UseLookupTableScalarRange, int);
106  vtkGetMacro(UseLookupTableScalarRange, int);
107  vtkBooleanMacro(UseLookupTableScalarRange, int);
109 
111 
114  vtkSetVector2Macro(ScalarRange, double);
115  vtkGetVectorMacro(ScalarRange, double, 2);
117 
119 
129  vtkSetMacro(ScalarMode, int);
130  vtkGetMacro(ScalarMode, int);
132  { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT); }
134  { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA); }
136  { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA); }
138  { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA); }
140  { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA); }
142 
144 
145  void ColorByArrayComponent(int arrayNum, int component);
146  void ColorByArrayComponent(char* arrayName, int component);
148 
150 
151  char* GetArrayName() { return this->ArrayName; }
152  int GetArrayId() { return this->ArrayId; }
153  int GetArrayAccessMode() { return this->ArrayAccessMode; }
154  int GetArrayComponent() { return this->ArrayComponent; }
156 
159  virtual unsigned long GetMTime();
160 
162 
166  virtual void SetTransformCoordinate(vtkCoordinate*);
167  vtkGetObjectMacro(TransformCoordinate, vtkCoordinate);
169 
171 
174  vtkGetMacro(TransformCoordinateUseDouble, bool);
175  vtkSetMacro(TransformCoordinateUseDouble, bool);
176  vtkBooleanMacro(TransformCoordinateUseDouble, bool);
178 
184  vtkUnsignedCharArray *MapScalars(double alpha);
185 
188 
189 protected:
192 
193  virtual int FillInputPortInformation(int, vtkInformation*);
194 
196 
200  double ScalarRange[2];
204 
207 
208  // for coloring by a component of a field data array
209  int ArrayId;
210  char ArrayName[256];
213 private:
214  vtkPolyDataMapper2D(const vtkPolyDataMapper2D&); // Not implemented.
215  void operator=(const vtkPolyDataMapper2D&); // Not implemented.
216 };
217 
218 
219 #endif
220 
virtual unsigned long GetMTime()
#define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
GLuint in
Definition: vtkgl.h:16905
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Superclass for mapping scalar values to colors.
#define VTK_SCALAR_MODE_USE_POINT_DATA
vtkScalarsToColors * LookupTable
a simple class to control print indentation
Definition: vtkIndent.h:38
const GLfloat * m
Definition: vtkgl.h:18169
#define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA
void PrintSelf(ostream &os, vtkIndent indent)
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkCoordinate * TransformCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
dynamic, self-adjusting array of unsigned char
abstract class specifies interface to map data
#define VTKRENDERINGCORE_EXPORT
void ShallowCopy(vtkAbstractMapper *m)
static vtkAlgorithm * New()
GLclampf GLclampf GLclampf alpha
Definition: vtkgl.h:11313
#define VTK_SCALAR_MODE_USE_CELL_DATA
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:34
draw vtkPolyData onto the image plane
#define VTK_SCALAR_MODE_DEFAULT
vtkUnsignedCharArray * Colors