VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/OpenGL/vtkColorMaterialHelper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkColorMaterialHelper.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef vtkColorMaterialHelper_h
00029 #define vtkColorMaterialHelper_h
00030 
00031 #include "vtkRenderingOpenGLModule.h" // For export macro
00032 #include "vtkObject.h"
00033 
00034 class vtkShaderProgram2;
00035 
00036 class VTKRENDERINGOPENGL_EXPORT vtkColorMaterialHelper : public vtkObject
00037 {
00038 public:
00039   static vtkColorMaterialHelper* New();
00040   vtkTypeMacro(vtkColorMaterialHelper, vtkObject);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00043   //BTX
00044   void Initialize(vtkShaderProgram2*);
00045   vtkGetObjectMacro(Shader, vtkShaderProgram2);
00046   //ETX
00047 
00050   void SetUniformVariables();
00051 
00054   void PrepareForRendering();
00055 
00059   void Render();
00060 
00061 //BTX
00062 protected:
00063   vtkColorMaterialHelper();
00064   ~vtkColorMaterialHelper();
00065 
00066   void SetShader(vtkShaderProgram2*);
00067   vtkShaderProgram2 * Shader;
00068 
00069   enum eMaterialParamater
00070     {
00071     DISABLED = 0,
00072     AMBIENT = 1,
00073     DIFFUSE = 2,
00074     SPECULAR = 3,
00075     AMBIENT_AND_DIFFUSE = 4,
00076     EMISSION = 5
00077     };
00078   eMaterialParamater Mode;
00079 
00080 private:
00081   vtkColorMaterialHelper(const vtkColorMaterialHelper&); // Not implemented.
00082   void operator=(const vtkColorMaterialHelper&); // Not implemented.
00083 //ETX
00084 };
00085 
00086 #endif