MeVisLab Toolbox Reference
SoVertexAttributeNodes.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2011, 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_VERTEX_ATTRIBUTE_NODES_H
14 #define SO_VERTEX_ATTRIBUTE_NODES_H
15 
16 
18 
19 #include "SoShaderSystem.h"
20 #include <Inventor/nodes/SoSubNode.h>
22 #include <Inventor/fields/SoSFString.h>
23 #include <Inventor/fields/SoSFBool.h>
24 #include <Inventor/fields/SoMFFloat.h>
25 #include <Inventor/fields/SoMFVec2f.h>
26 #include <Inventor/fields/SoMFVec3f.h>
27 #include <Inventor/fields/SoMFVec4f.h>
28 #include <Inventor/fields/SoMFRotation.h>
29 #include <Inventor/fields/SoMFUInt32.h>
30 #include <Inventor/fields/SoMFInt32.h>
31 
33 class INVENTOR_SHADER_API SoVertexAttributeBase : public SoNode
34 {
35  typedef SoNode inherited;
36 
37  SO_NODE_HEADER(SoVertexAttributeBase);
38 
39  public:
40  SoSFString name;
41 
42  SoSFBool perInstance;
43 
46 
47  SoINTERNAL public:
49  static void initClass();
50 
51  void GLRender(SoGLRenderAction *action) override;
52 
53  protected:
54  virtual void updateInfo() {};
55 
57 };
58 
59 //--------------------------------------------------------------------------
61 class INVENTOR_SHADER_API SoVertexAttribute1f : public SoVertexAttributeBase
62 {
63  typedef SoVertexAttributeBase inherited;
64 
65  SO_NODE_HEADER(SoVertexAttribute1f);
66 
67 public:
68  SoMFFloat values;
69 
72 
73  SoINTERNAL public:
75  static void initClass();
76 
77 protected:
78  void updateInfo() override;
79 };
80 
81 //--------------------------------------------------------------------------
83 class INVENTOR_SHADER_API SoVertexAttribute2f : public SoVertexAttributeBase
84 {
85  typedef SoVertexAttributeBase inherited;
86 
87  SO_NODE_HEADER(SoVertexAttribute2f);
88 
89 public:
90  SoMFVec2f values;
91 
94 
95  SoINTERNAL public:
97  static void initClass();
98 
99 protected:
100  void updateInfo() override;
101 };
102 
103 //--------------------------------------------------------------------------
105 class INVENTOR_SHADER_API SoVertexAttribute3f : public SoVertexAttributeBase
106 {
107  typedef SoVertexAttributeBase inherited;
108 
109  SO_NODE_HEADER(SoVertexAttribute3f);
110 
111 public:
112  SoMFVec3f values;
113 
116 
117  SoINTERNAL public:
119  static void initClass();
120 
121 protected:
122  void updateInfo() override;
123 };
124 
125 //--------------------------------------------------------------------------
127 class INVENTOR_SHADER_API SoVertexAttribute4f : public SoVertexAttributeBase
128 {
129  typedef SoVertexAttributeBase inherited;
130 
131  SO_NODE_HEADER(SoVertexAttribute4f);
132 
133 public:
134  SoMFVec4f values;
135 
138 
139  SoINTERNAL public:
141  static void initClass();
142 
143 protected:
144  void updateInfo() override;
145 };
146 
147 //--------------------------------------------------------------------------
149 class INVENTOR_SHADER_API SoVertexAttributeRotation : public SoVertexAttributeBase
150 {
151  typedef SoVertexAttributeBase inherited;
152 
153  SO_NODE_HEADER(SoVertexAttributeRotation);
154 
155 public:
156  SoMFRotation values;
157 
160 
161  SoINTERNAL public:
163  static void initClass();
164 
165 protected:
166  void updateInfo() override;
167 };
168 
169 //--------------------------------------------------------------------------
171 class INVENTOR_SHADER_API SoVertexAttribute1ui : public SoVertexAttributeBase
172 {
173  typedef SoVertexAttributeBase inherited;
174 
175  SO_NODE_HEADER(SoVertexAttribute1ui);
176 
177 public:
178  SoMFUInt32 values;
179  SoSFBool normalized;
180 
183 
184  SoINTERNAL public:
186  static void initClass();
187 
188 protected:
189  void updateInfo() override;
190 };
191 
192 //--------------------------------------------------------------------------
194 class INVENTOR_SHADER_API SoVertexAttribute1i : public SoVertexAttributeBase
195 {
196  typedef SoVertexAttributeBase inherited;
197 
198  SO_NODE_HEADER(SoVertexAttribute1i);
199 
200 public:
201  SoMFInt32 values;
202  SoSFBool normalized;
203 
206 
207  SoINTERNAL public:
209  static void initClass();
210 
211 protected:
212  void updateInfo() override;
213 };
214 
215 //--------------------------------------------------------------------------
221 class INVENTOR_SHADER_API SoVertexAttribute4ub : public SoVertexAttributeBase
222 {
223  typedef SoVertexAttributeBase inherited;
224 
225  SO_NODE_HEADER(SoVertexAttribute4ub);
226 
227 public:
228  SoMFUInt32 values;
229  SoSFBool normalized;
230 
233 
234  SoINTERNAL public:
236  static void initClass();
237 
238 protected:
239  void updateInfo() override;
240 };
241 
242 #endif
Vertex attribute of type float.
SoVertexAttribute1f()
Constructor.
static void initClass()
Initialize class with runtime type system.
void updateInfo() override
Vertex attribute of type Int32.
SoVertexAttribute1i()
Constructor.
static void initClass()
Initialize class with runtime type system.
void updateInfo() override
Vertex attribute of type UInt32.
static void initClass()
Initialize class with runtime type system.
SoVertexAttribute1ui()
Constructor.
void updateInfo() override
Vertex attribute of type SbVec2f.
static void initClass()
Initialize class with runtime type system.
void updateInfo() override
SoVertexAttribute2f()
Constructor.
Vertex attribute of type SbVec3f.
static void initClass()
Initialize class with runtime type system.
SoVertexAttribute3f()
Constructor.
void updateInfo() override
Vertex attribute of type SbVec4f.
SoVertexAttribute4f()
Constructor.
void updateInfo() override
static void initClass()
Initialize class with runtime type system.
Vertex attribute of type UInt32 interpreted as 4 unsigned bytes NOTE: the values are interpreted as R...
SoVertexAttribute4ub()
Constructor.
void updateInfo() override
static void initClass()
Initialize class with runtime type system.
Open Inventor vertex attribute nodes.
static void initClass()
Initialize class with runtime type system.
SoVertexAttributeInfo _info
void GLRender(SoGLRenderAction *action) override
SoVertexAttributeBase()
Constructor.
Vertex attribute of type SbRotation.
void updateInfo() override
static void initClass()
Initialize class with runtime type system.
SoVertexAttributeRotation()
Constructor.
Open Inventor element storing a list of vertex attributes.