VTK
vtkValuePainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkValuePainter.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 =========================================================================*/
30 #ifndef vtkValuePainter_h
31 #define vtkValuePainter_h
32 
33 #include "vtkRenderingOpenGLModule.h" // For export macro
35 
39 
42 {
43 public:
44  static vtkValuePainter* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
53  void SetInputArrayToProcess(int fieldAssociation, const char *name);
54  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
56 
60  void SetInputComponentToProcess(int comp);
61 
64  void SetScalarRange(double min, double max);
65 
67 
69  static vtkInformationIntegerKey* SCALAR_MODE();
70  static vtkInformationDoubleVectorKey* SCALAR_RANGE();
71  static vtkInformationIntegerKey* ARRAY_ID();
72  static vtkInformationStringKey* ARRAY_NAME();
73  static vtkInformationIntegerKey* ARRAY_COMPONENT();
75 
77 
79  static void ValueToColor(double value, double min, double scale,
80  unsigned char *color);
82 
83  static void ColorToValue(unsigned char *color, double min, double scale,
84  double &value);
85 
86 protected:
88  ~vtkValuePainter();
89 
92  virtual void ProcessInformation(vtkInformation*);
93 
95 
96  virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
97  unsigned long typeflags, bool forceCompileOnly);
99 
101 
102  void DrawCells(int mode, vtkCellArray *connectivity,
103  vtkIdType startCellId, vtkRenderer *renderer);
105 
106 private:
107  vtkValuePainter(const vtkValuePainter&); // Not implemented.
108  void operator=(const vtkValuePainter&); // Not implemented.
109 
110  class vtkInternals;
111  vtkInternals *Internals;
112 };
113 
114 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
A standard implementation of vtkPolyDataPainter.
Store vtkAlgorithm input/output information.
virtual void PrintSelf(ostream &os, vtkIndent indent)
abstract specification for renderers
Definition: vtkRenderer.h:63
void DrawCells(int mode, vtkCellArray *connectivity, vtkIdType startCellId, vtkShaderDeviceAdapter2 *shaderDevice2, vtkRenderer *renderer, int buildnormals, int interpolation)
int vtkIdType
Definition: vtkType.h:275
Key for string values in vtkInformation.
Key for double vector values.
virtual void ProcessInformation(vtkInformation *)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGOPENGL_EXPORT
Key for integer values in vtkInformation.
object to represent cell connectivity
Definition: vtkCellArray.h:49
painter that renders arrays encoded into pixel colors.
virtual void RenderInternal(vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
#define max(a, b)
static vtkStandardPolyDataPainter * New()