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 =========================================================================*/
31 #ifndef vtkValuePainter_h
32 #define vtkValuePainter_h
33 
34 #include "vtkRenderingOpenGLModule.h" // For export macro
36 
40 
41 class VTKRENDERINGOPENGL_EXPORT vtkValuePainter :
43 {
44 public:
45  static vtkValuePainter* New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
56  void SetInputArrayToProcess(int fieldAssociation, const char *name);
57  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
59 
65  void SetInputComponentToProcess(int comp);
66 
71  void SetScalarRange(double min, double max);
72 
74 
78  static vtkInformationIntegerKey* SCALAR_MODE();
79  static vtkInformationDoubleVectorKey* SCALAR_RANGE();
80  static vtkInformationIntegerKey* ARRAY_ID();
81  static vtkInformationStringKey* ARRAY_NAME();
82  static vtkInformationIntegerKey* ARRAY_COMPONENT();
84 
89  static void ValueToColor(double value, double min, double scale,
90  unsigned char *color);
91 
92  static void ColorToValue(unsigned char *color, double min, double scale,
93  double &value);
94 
95 protected:
97  ~vtkValuePainter();
98 
102  virtual void ProcessInformation(vtkInformation*);
103 
107  virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
108  unsigned long typeflags, bool forceCompileOnly);
109 
114  void DrawCells(int mode, vtkCellArray *connectivity,
115  vtkIdType startCellId, vtkRenderer *renderer);
116 
117 private:
118  vtkValuePainter(const vtkValuePainter&) VTK_DELETE_FUNCTION;
119  void operator=(const vtkValuePainter&) VTK_DELETE_FUNCTION;
120 
121  class vtkInternals;
122  vtkInternals *Internals;
123 };
124 
125 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
A standard implementation of vtkPolyDataPainter.
Store vtkAlgorithm input/output information.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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:287
Key for string values in vtkInformation.
Key for double vector values.
virtual void ProcessInformation(vtkInformation *)
Called before RenderInternal() if the Information has been changed since the last time this method wa...
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for integer values in vtkInformation.
object to represent cell connectivity
Definition: vtkCellArray.h:50
painter that renders arrays encoded into pixel colors.
virtual void RenderInternal(vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
Generates rendering primitives of appropriate type(s).
#define max(a, b)
static vtkStandardPolyDataPainter * New()