VTK
vtkUniformVariables.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUniformVariables.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef __vtkUniformVariables_h
30 #define __vtkUniformVariables_h
31 
32 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkUniformVariablesMap; // internal
36 
37 class VTKRENDERINGOPENGL_EXPORT vtkUniformVariables : public vtkObject
38 {
39 public:
40  static vtkUniformVariables *New();
42  void PrintSelf(ostream &os, vtkIndent indent);
43 
45 
48  void SetUniformi(const char *name,
49  int numberOfComponents,
50  int *value);
52 
54 
57  void SetUniformf(const char *name,
58  int numberOfComponents,
59  float *value);
61 
63 
68  void SetUniformiv(const char *name,
69  int numberOfComponents,
70  int numberOfElements,
71  int *value);
73 
75 
80  void SetUniformfv(const char *name,
81  int numberOfComponents,
82  int numberOfElements,
83  float *value);
85 
87 
90  void SetUniformMatrix(const char *name,
91  int rows,
92  int columns,
93  float *value);
95 
97  void RemoveUniform(const char *name);
98 
100  void RemoveAllUniforms();
101 
103 
104  void Send(const char *name,
105  int uniformIndex);
107 
109  void Start();
110 
112  bool IsAtEnd();
113 
116  const char *GetCurrentName();
117 
120  void SendCurrentUniform(int uniformIndex);
121 
123  void Next();
124 
127  void DeepCopy(vtkUniformVariables *other);
128 
131  void Merge(vtkUniformVariables *other);
132 
133 protected:
135  virtual ~vtkUniformVariables();
136 
137 private:
138  vtkUniformVariables(const vtkUniformVariables&); // Not implemented.
139  void operator=(const vtkUniformVariables&); // Not implemented.
140 
141  vtkUniformVariablesMap *Map;
142 };
143 #endif