VTK
vtkValuePass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkValuePass.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 =========================================================================*/
40 #ifndef vtkValuePass_h
41 #define vtkValuePass_h
42 
43 #include "vtkRenderingOpenGL2Module.h" // For export macro
44 #include "vtkDefaultPass.h"
45 
49 class vtkRenderer;
50 class vtkRenderWindow;
51 class vtkFloatArray;
52 
53 class VTKRENDERINGOPENGL2_EXPORT vtkValuePass : public vtkDefaultPass
54 {
55 public:
56 
57  enum Mode {
58  INVERTIBLE_LUT = 1,
59  FLOATING_POINT = 2 };
60 
61  static vtkValuePass *New();
62  vtkTypeMacro(vtkValuePass, vtkDefaultPass);
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
66 
67  vtkSetMacro(RenderingMode, int);
68  vtkGetMacro(RenderingMode, int);
69  void SetInputArrayToProcess(int fieldAssociation, const char *name);
70  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
72  void SetScalarRange(double min, double max);
73 
75 
86 
91  virtual void Render(const vtkRenderState *s);
92 
99 
105  void GetFloatImageData(int const format, int const width, int const height,
106  void* data);
107 
113 
115 
116  protected:
121 
125  virtual ~vtkValuePass();
126 
131  virtual void RenderOpaqueGeometry(const vtkRenderState *s);
132 
137  void BeginPass(vtkRenderer* ren);
138 
142  void EndPass();
143 
145 
152 
153 
154  class vtkInternals;
155  vtkInternals *Internals;
157 
158  private:
159  vtkValuePass(const vtkValuePass&) VTK_DELETE_FUNCTION;
160  void operator=(const vtkValuePass&) VTK_DELETE_FUNCTION;
161 
162 };
163 
164 #endif
Implement the basic render passes.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Context in which a vtkRenderPass will render.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
Render opaque objects with the vtkValuePainter.
Definition: vtkValuePass.h:32
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkInformationIntegerKey * SCALAR_MODE()
Passed down the rendering pipeline to control what data array to draw.
bool HasWindowSizeChanged(vtkRenderer *ren)
Methods managing graphics resources required during FLOATING_POINT mode.
static vtkValuePass * New()
virtual ~vtkValuePass()
Destructor.
vtkValuePass()
Default constructor.
static vtkInformationIntegerKey * RENDER_VALUES()
static vtkInformationIntegerKey * ARRAY_MODE()
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.
int * GetFloatImageExtents()
Interface to get the rendered image in FLOATING_POINT mode.
void EndPass()
Unbinds internal FBO when FLOATING_POINT mode is enabled.
void ReleaseFloatingPointMode(vtkRenderer *ren)
static vtkInformationDoubleVectorKey * SCALAR_RANGE()
static vtkInformationIntegerKey * ARRAY_ID()
static vtkInformationStringKey * ARRAY_NAME()
void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType)
void GetFloatImageData(int const format, int const width, int const height, void *data)
Interface to get the rendered image in FLOATING_POINT mode.
void SetInputArrayToProcess(int fieldAssociation, const char *name)
void BeginPass(vtkRenderer *ren)
Manages graphics resources depending on the rendering mode.
bool IsFloatingPointModeSupported(vtkRenderWindow *renWin)
virtual void RenderOpaqueGeometry(const vtkRenderState *s)
Opaque pass with key checking.
static vtkInformationIntegerKey * ARRAY_COMPONENT()
vtkFloatArray * GetFloatImageDataArray(vtkRenderer *ren)
Interface to get the rendered image in FLOATING_POINT mode.
void SetScalarRange(double min, double max)
static vtkInformationIntegerKey * RELOAD_DATA()
void SetInputComponentToProcess(int component)
bool InitializeFloatingPointMode(vtkRenderer *ren)
@ component
Definition: vtkX3D.h:175
@ height
Definition: vtkX3D.h:254
@ name
Definition: vtkX3D.h:219
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define max(a, b)