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=========================================================================*/
32#ifndef vtkLightingHelper_h
33#define vtkLightingHelper_h
34
35#include "vtkRenderingOpenGLModule.h" // For export macro
36#include "vtkObject.h"
37#include "vtkShader2.h" // for vtkShader2Type
38
40
41class VTKRENDERINGOPENGL_EXPORT vtkLightingHelper : public vtkObject
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent);
47
48 enum {
49 VTK_MAX_LIGHTS=8
50 };
51
53
60 vtkGetObjectMacro(Shader, vtkShaderProgram2);
62
66 void EncodeLightState(){ this->PrepareForRendering(); }
68
69protected:
72
75
76private:
77 vtkLightingHelper(const vtkLightingHelper&) VTK_DELETE_FUNCTION;
78 void operator=(const vtkLightingHelper&) VTK_DELETE_FUNCTION;
79
80};
81
82#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
helper to assist in simulating lighting similar to default OpenGL pipeline.
void PrepareForRendering()
void EncodeLightState()
Encodes light state in diffuse component 3, where the shader looks for it.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void Initialize(vtkShaderProgram2 *shader, vtkShader2Type mode)
Get/Set the shader program to which we want to add the lighting kernels.
vtkShaderProgram2 * Shader
void SetShader(vtkShaderProgram2 *shader)
static vtkLightingHelper * New()
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ mode
Definition: vtkX3D.h:247
vtkShader2Type
Definition: vtkShader2.h:51