VTK
vtkColorMaterialHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkColorMaterialHelper.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 =========================================================================*/
29 #ifndef vtkColorMaterialHelper_h
30 #define vtkColorMaterialHelper_h
31 
32 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkShaderProgram2;
36 
37 class VTKRENDERINGOPENGL_EXPORT vtkColorMaterialHelper : public vtkObject
38 {
39 public:
40  static vtkColorMaterialHelper* New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
44  void Initialize(vtkShaderProgram2*);
45  vtkGetObjectMacro(Shader, vtkShaderProgram2);
46 
51  void SetUniformVariables();
52 
57  void PrepareForRendering();
58 
65  void Render();
66 
67 protected:
70 
71  void SetShader(vtkShaderProgram2*);
73 
75  {
76  DISABLED = 0,
77  AMBIENT = 1,
78  DIFFUSE = 2,
79  SPECULAR = 3,
80  AMBIENT_AND_DIFFUSE = 4,
81  EMISSION = 5
82  };
84 
85 private:
86  vtkColorMaterialHelper(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
87  void operator=(const vtkColorMaterialHelper&) VTK_DELETE_FUNCTION;
88 
89 };
90 
91 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a helper to assist in simulating the ColorMaterial behaviour of the default OpenGL pipeline...
GLSL Program.
vtkShaderProgram2 * Shader
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...