VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkUniformVariables.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 =========================================================================*/ 00029 #ifndef __vtkUniformVariables_h 00030 #define __vtkUniformVariables_h 00031 00032 #include "vtkRenderingOpenGLModule.h" // For export macro 00033 #include "vtkObject.h" 00034 00035 class vtkUniformVariablesMap; // internal 00036 00037 class VTKRENDERINGOPENGL_EXPORT vtkUniformVariables : public vtkObject 00038 { 00039 public: 00040 static vtkUniformVariables *New(); 00041 vtkTypeMacro(vtkUniformVariables,vtkObject); 00042 void PrintSelf(ostream &os, vtkIndent indent); 00043 00045 00048 void SetUniformi(const char *name, 00049 int numberOfComponents, 00050 int *value); 00052 00054 00057 void SetUniformf(const char *name, 00058 int numberOfComponents, 00059 float *value); 00061 00063 00068 void SetUniformiv(const char *name, 00069 int numberOfComponents, 00070 int numberOfElements, 00071 int *value); 00073 00075 00080 void SetUniformfv(const char *name, 00081 int numberOfComponents, 00082 int numberOfElements, 00083 float *value); 00085 00087 00090 void SetUniformMatrix(const char *name, 00091 int rows, 00092 int columns, 00093 float *value); 00095 00097 void RemoveUniform(const char *name); 00098 00100 void RemoveAllUniforms(); 00101 00103 00104 void Send(const char *name, 00105 int uniformIndex); 00107 00109 void Start(); 00110 00112 bool IsAtEnd(); 00113 00116 const char *GetCurrentName(); 00117 00120 void SendCurrentUniform(int uniformIndex); 00121 00123 void Next(); 00124 00127 void DeepCopy(vtkUniformVariables *other); 00128 00131 void Merge(vtkUniformVariables *other); 00132 00133 protected: 00134 vtkUniformVariables(); 00135 virtual ~vtkUniformVariables(); 00136 00137 private: 00138 vtkUniformVariables(const vtkUniformVariables&); // Not implemented. 00139 void operator=(const vtkUniformVariables&); // Not implemented. 00140 00141 vtkUniformVariablesMap *Map; 00142 }; 00143 #endif