FreeMat
|
Section: Visualization Toolkit Rendering Classes
vtkUniformVariables is a list of uniform variables attached to either a vtkShader2 object or to a vtkShaderProgram2. Uniform variables on a vtkShaderProgram2 override values of uniform variables on a vtkShader2.
To create an instance of class vtkUniformVariables, simply invoke its constructor as follows
obj = vtkUniformVariables
The class vtkUniformVariables has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj
is an instance of the vtkUniformVariables class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkUniformVariables = obj.NewInstance ()
vtkUniformVariables = obj.SafeDownCast (vtkObject o)
obj.SetUniformi (string name, int numberOfComponents, int value)
- Set an integer uniform variable. obj.SetUniformf (string name, int numberOfComponents, float value)
- Set an float uniform variable. obj.SetUniformiv (string name, int numberOfComponents, int numberOfElements, int value)
- Set an array of integer uniform variables. The array `value' is of size `numberOfElements'*`numberOfComponents.'. obj.SetUniformfv (string name, int numberOfComponents, int numberOfElements, float value)
- Set an array of float uniform variables. The array `value' is of size `numberOfElements'*`numberOfComponents.'. obj.SetUniformMatrix (string name, int rows, int columns, float value)
- Set a matrix uniform variable. obj.RemoveUniform (string name)
- Remove uniform `name' from the list. obj.RemoveAllUniforms ()
- Remove all uniforms from the list. obj.Send (string name, int uniformIndex)
- obj.Start ()
- Place the internal cursor on the first uniform. bool = obj.IsAtEnd ()
- Is the iteration done? string = obj.GetCurrentName ()
- Name of the uniform at the current cursor position. obj.SendCurrentUniform (int uniformIndex)
- obj.Next ()
- Move the cursor to the next uniform. obj.DeepCopy (vtkUniformVariables other)
- Copy all the variables from `other'. Any existing variable will be deleted first. obj.Merge (vtkUniformVariables other)
- Copy all the variables from `other'. Any existing variable will be overwritten.