VTK
|
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 PrepareForRendering(); 00051 00054 void Render(); 00055 00056 //BTX 00057 protected: 00058 vtkColorMaterialHelper(); 00059 ~vtkColorMaterialHelper(); 00060 00061 void SetShader(vtkShaderProgram2*); 00062 vtkShaderProgram2 * Shader; 00063 00064 enum eMaterialParamater 00065 { 00066 DISABLED = 0, 00067 AMBIENT = 1, 00068 DIFFUSE = 2, 00069 SPECULAR = 3, 00070 AMBIENT_AND_DIFFUSE = 4, 00071 EMISSION = 5 00072 }; 00073 eMaterialParamater Mode; 00074 00075 private: 00076 vtkColorMaterialHelper(const vtkColorMaterialHelper&); // Not implemented. 00077 void operator=(const vtkColorMaterialHelper&); // Not implemented. 00078 //ETX 00079 }; 00080 00081 #endif