VTK
vtkLightingHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLightingHelper.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 vtkLightingHelper_h
32 #define vtkLightingHelper_h
33 
34 #include "vtkRenderingOpenGLModule.h" // For export macro
35 #include "vtkObject.h"
36 #include "vtkShader2.h" // for vtkShader2Type
37 
38 class vtkShaderProgram2;
39 
41 {
42 public:
43  static vtkLightingHelper* New();
44  vtkTypeMacro(vtkLightingHelper, vtkObject);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
47  enum {
48  VTK_MAX_LIGHTS=8
49  };
50 
52 
56  void Initialize(vtkShaderProgram2 *shader, vtkShader2Type mode);
57  vtkGetObjectMacro(Shader, vtkShaderProgram2);
59 
61 
63  void EncodeLightState(){ this->PrepareForRendering(); }
64  void PrepareForRendering();
66 
67 //BTX
68 protected:
71 
72  void SetShader(vtkShaderProgram2 *shader);
74 
75 private:
76  vtkLightingHelper(const vtkLightingHelper&); // Not implemented.
77  void operator=(const vtkLightingHelper&); // Not implemented.
78 //ETX
79 };
80 
81 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkShader2Type
Definition: vtkShader2.h:49
helper to assist in simulating lighting similar to default OpenGL pipeline.
GLSL Program.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKRENDERINGOPENGL_EXPORT
vtkShaderProgram2 * Shader
static vtkObject * New()