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 "vtkObject.h" 00033 00034 class vtkUniformVariablesMap; // internal 00035 00036 class VTK_RENDERING_EXPORT vtkUniformVariables : public vtkObject 00037 { 00038 public: 00039 static vtkUniformVariables *New(); 00040 vtkTypeMacro(vtkUniformVariables,vtkObject); 00041 void PrintSelf(ostream &os, vtkIndent indent); 00042 00044 00047 void SetUniformi(const char *name, 00048 int numberOfComponents, 00049 int *value); 00051 00053 00056 void SetUniformf(const char *name, 00057 int numberOfComponents, 00058 float *value); 00060 00062 00067 void SetUniformiv(const char *name, 00068 int numberOfComponents, 00069 int numberOfElements, 00070 int *value); 00072 00074 00079 void SetUniformfv(const char *name, 00080 int numberOfComponents, 00081 int numberOfElements, 00082 float *value); 00084 00086 00089 void SetUniformMatrix(const char *name, 00090 int rows, 00091 int columns, 00092 float *value); 00094 00096 void RemoveUniform(const char *name); 00097 00099 void RemoveAllUniforms(); 00100 00102 00103 void Send(const char *name, 00104 int uniformIndex); 00106 00108 void Start(); 00109 00111 bool IsAtEnd(); 00112 00115 const char *GetCurrentName(); 00116 00119 void SendCurrentUniform(int uniformIndex); 00120 00122 void Next(); 00123 00126 void DeepCopy(vtkUniformVariables *other); 00127 00130 void Merge(vtkUniformVariables *other); 00131 00132 protected: 00133 vtkUniformVariables(); 00134 virtual ~vtkUniformVariables(); 00135 00136 private: 00137 vtkUniformVariables(const vtkUniformVariables&); // Not implemented. 00138 void operator=(const vtkUniformVariables&); // Not implemented. 00139 00140 vtkUniformVariablesMap *Map; 00141 }; 00142 #endif