MeVisLab Toolbox Reference
SoUniformShaderParameterElement.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef SO_UNIFORM_SHADER_PARAMETER_ELEMENT_H
14 #define SO_UNIFORM_SHADER_PARAMETER_ELEMENT_H
15 
16 
18 
19 #include "SoShaderSystem.h"
20 #include <Inventor/elements/SoAccumulatedElement.h>
21 #include <Inventor/SoLists.h>
22 
24 
26 class INVENTOR_SHADER_API SoUniformShaderParameterElement : public SoAccumulatedElement
27 {
28  typedef SoAccumulatedElement inherited;
29 
30  SO_ELEMENT_HEADER(SoUniformShaderParameterElement);
31 
32  public:
33 
35  void init(SoState *state) override;
36 
38  static void add(SoState *state, SoUniformShaderParameter *shaderParameter);
39 
41  static void set(SoState *state, SoUniformShaderParameter *shaderParameter);
42 
44  static void clear(SoState *state, SoNode *node);
45 
47  static const SoNodeList &get(SoState *state);
48 
50  void push(SoState *state) override;
51 
52  SoINTERNAL public:
53 
55  static void initClass();
56 
57  protected:
58 
60  SoNodeList _shaderParameters;
61 };
62 
63 #endif // _SO_UNIFORM_SHADER_PARAMETER_ELEMENT_
Open Inventor element storing a list of shader parameter nodes.
static void set(SoState *state, SoUniformShaderParameter *shaderParameter)
Truncate the shader parameter list to zero length and set only this parameter.
SoNodeList _shaderParameters
List of shader parameter nodes.
static const SoNodeList & get(SoState *state)
Returns the current list of shader parameters from the state.
void init(SoState *state) override
Initialize element.
static void add(SoState *state, SoUniformShaderParameter *shaderParameter)
Add to the current shader parameter list.
void push(SoState *state) override
Overrides push() method to copy values from next instance in the stack.
static void clear(SoState *state, SoNode *node)
Clear list.
static void initClass()
Initialize class with runtime type system.
Abstract Open Inventor base class for uniform shader parameter nodes.