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
vtkValuePass::SCALAR_MODE
static vtkInformationIntegerKey * SCALAR_MODE()
Passed down the rendering pipeline to control what data array to draw.
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:37
vtkValuePass::RenderOpaqueGeometry
virtual void RenderOpaqueGeometry(const vtkRenderState *s)
Opaque pass with key checking.
vtkX3D::component
@ component
Definition: vtkX3D.h:175
vtkValuePass::ARRAY_NAME
static vtkInformationStringKey * ARRAY_NAME()
vtkValuePass::ARRAY_ID
static vtkInformationIntegerKey * ARRAY_ID()
vtkValuePass::GetFloatImageDataArray
vtkFloatArray * GetFloatImageDataArray(vtkRenderer *ren)
Interface to get the rendered image in FLOATING_POINT mode.
vtkValuePass::ReleaseFloatingPointMode
void ReleaseFloatingPointMode(vtkRenderer *ren)
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkValuePass::InitializeFloatingPointMode
bool InitializeFloatingPointMode(vtkRenderer *ren)
vtkValuePass::GetFloatImageExtents
int * GetFloatImageExtents()
Interface to get the rendered image in FLOATING_POINT mode.
vtkValuePass::Mode
Mode
Definition: vtkValuePass.h:57
vtkValuePass::RENDER_VALUES
static vtkInformationIntegerKey * RENDER_VALUES()
vtkValuePass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDefaultPass.h
vtkValuePass::SCALAR_RANGE
static vtkInformationDoubleVectorKey * SCALAR_RANGE()
vtkDefaultPass
Implement the basic render passes.
Definition: vtkDefaultPass.h:44
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkValuePass::IsFloatingPointModeSupported
bool IsFloatingPointModeSupported(vtkRenderWindow *renWin)
vtkValuePass::HasWindowSizeChanged
bool HasWindowSizeChanged(vtkRenderer *ren)
Methods managing graphics resources required during FLOATING_POINT mode.
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkValuePass::Render
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.
vtkValuePass::vtkValuePass
vtkValuePass()
Default constructor.
vtkValuePass::RELOAD_DATA
static vtkInformationIntegerKey * RELOAD_DATA()
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkValuePass::EndPass
void EndPass()
Unbinds internal FBO when FLOATING_POINT mode is enabled.
vtkValuePass::GetFloatImageData
void GetFloatImageData(int const format, int const width, int const height, void *data)
Interface to get the rendered image in FLOATING_POINT mode.
vtkValuePass::SetScalarRange
void SetScalarRange(double min, double max)
vtkValuePass::SetInputArrayToProcess
void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType)
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkValuePass::BeginPass
void BeginPass(vtkRenderer *ren)
Manages graphics resources depending on the rendering mode.
vtkValuePass
Render opaque objects with the vtkValuePainter.
Definition: vtkValuePass.h:32
vtkValuePass::~vtkValuePass
virtual ~vtkValuePass()
Destructor.
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:35
vtkValuePass::ARRAY_MODE
static vtkInformationIntegerKey * ARRAY_MODE()
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkValuePass::SetInputComponentToProcess
void SetInputComponentToProcess(int component)
vtkValuePass::SetInputArrayToProcess
void SetInputArrayToProcess(int fieldAssociation, const char *name)
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:87
vtkValuePass::RenderingMode
int RenderingMode
Definition: vtkValuePass.h:156
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:41
vtkValuePass::New
static vtkValuePass * New()
vtkValuePass::ARRAY_COMPONENT
static vtkInformationIntegerKey * ARRAY_COMPONENT()