VTK
dox
Rendering
OpenGL
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
39
class
vtkShaderProgram2
;
40
41
class
VTKRENDERINGOPENGL_EXPORT
vtkLightingHelper
:
public
vtkObject
42
{
43
public
:
44
static
vtkLightingHelper
*
New
();
45
vtkTypeMacro(
vtkLightingHelper
,
vtkObject
);
46
void
PrintSelf
(ostream& os,
vtkIndent
indent);
47
48
enum
{
49
VTK_MAX_LIGHTS=8
50
};
51
53
59
void
Initialize(
vtkShaderProgram2
*shader,
vtkShader2Type
mode
);
60
vtkGetObjectMacro(Shader,
vtkShaderProgram2
);
62
66
void
EncodeLightState
(){ this->PrepareForRendering(); }
67
void
PrepareForRendering();
68
69
protected
:
70
vtkLightingHelper
();
71
~
vtkLightingHelper
();
72
73
void
SetShader(
vtkShaderProgram2
*shader);
74
vtkShaderProgram2
*
Shader
;
75
76
private
:
77
vtkLightingHelper
(
const
vtkLightingHelper
&) VTK_DELETE_FUNCTION;
78
void
operator=(
const
vtkLightingHelper
&) VTK_DELETE_FUNCTION;
79
80
};
81
82
#endif
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkShader2.h
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkLightingHelper
helper to assist in simulating lighting similar to default OpenGL pipeline.
Definition:
vtkLightingHelper.h:41
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLightingHelper::EncodeLightState
void EncodeLightState()
Encodes light state in diffuse component 3, where the shader looks for it.
Definition:
vtkLightingHelper.h:66
vtkObject.h
vtkLightingHelper::Shader
vtkShaderProgram2 * Shader
Definition:
vtkLightingHelper.h:74
vtkShader2Type
vtkShader2Type
Definition:
vtkShader2.h:50
vtkShaderProgram2
GLSL Program.
Definition:
vtkShaderProgram2.h:68
vtkX3D::mode
Definition:
vtkX3D.h:247
Generated by
1.8.16