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 "vtkObject.h" 00032 00033 class vtkShaderProgram2; 00034 00035 class VTK_RENDERING_EXPORT vtkColorMaterialHelper : public vtkObject 00036 { 00037 public: 00038 static vtkColorMaterialHelper* New(); 00039 vtkTypeMacro(vtkColorMaterialHelper, vtkObject); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00042 //BTX 00043 void Initialize(vtkShaderProgram2*); 00044 vtkGetObjectMacro(Shader, vtkShaderProgram2); 00045 //ETX 00046 00049 void PrepareForRendering(); 00050 00053 void Render(); 00054 00055 //BTX 00056 protected: 00057 vtkColorMaterialHelper(); 00058 ~vtkColorMaterialHelper(); 00059 00060 void SetShader(vtkShaderProgram2*); 00061 vtkShaderProgram2 * Shader; 00062 00063 enum eMaterialParamater 00064 { 00065 DISABLED = 0, 00066 AMBIENT = 1, 00067 DIFFUSE = 2, 00068 SPECULAR = 3, 00069 AMBIENT_AND_DIFFUSE = 4, 00070 EMISSION = 5 00071 }; 00072 eMaterialParamater Mode; 00073 00074 private: 00075 vtkColorMaterialHelper(const vtkColorMaterialHelper&); // Not implemented. 00076 void operator=(const vtkColorMaterialHelper&); // Not implemented. 00077 //ETX 00078 }; 00079 00080 #endif