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 =========================================================================*/
37 #ifndef vtkValuePass_h
38 #define vtkValuePass_h
39 
40 #include "vtkRenderingOpenGL2Module.h" // For export macro
41 #include "vtkDefaultPass.h"
42 
46 class vtkRenderer;
47 class vtkRenderWindow;
48 class vtkFloatArray;
49 
50 class VTKRENDERINGOPENGL2_EXPORT vtkValuePass : public vtkDefaultPass
51 {
52 public:
53 
54  enum Mode {
55  INVERTIBLE_LUT = 1,
56  FLOATING_POINT = 2 };
57 
58  static vtkValuePass *New();
59  vtkTypeMacro(vtkValuePass, vtkDefaultPass);
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
64  vtkSetMacro(RenderingMode, int);
65  vtkGetMacro(RenderingMode, int);
66  void SetInputArrayToProcess(int fieldAssociation, const char *name);
67  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
69  void SetScalarRange(double min, double max);
70 
72 
83 
88  virtual void Render(const vtkRenderState *s);
89 
96 
102  void GetFloatImageData(int const format, int const width, int const height,
103  void* data);
104 
110 
112 
113  protected:
118 
122  virtual ~vtkValuePass();
123 
128  virtual void RenderOpaqueGeometry(const vtkRenderState *s);
129 
134  void BeginPass(vtkRenderer* ren);
135 
139  void EndPass();
140 
142 
149 
150 
151  class vtkInternals;
152  vtkInternals *Internals;
154 
155  private:
156  vtkValuePass(const vtkValuePass&) VTK_DELETE_FUNCTION;
157  void operator=(const vtkValuePass&) VTK_DELETE_FUNCTION;
158 
159 };
160 
161 #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:54
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:47
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:35
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:153
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:41
vtkValuePass::New
static vtkValuePass * New()
vtkValuePass::ARRAY_COMPONENT
static vtkInformationIntegerKey * ARRAY_COMPONENT()