MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoMFShaderObject.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_MFSHADER_OBJECT_H
14
#define SO_MFSHADER_OBJECT_H
15
16
18
19
#include "
SoShaderSystem.h
"
20
#include <Inventor/fields/SoSubField.h>
21
22
class
SoShaderObject
;
23
class
SoNode;
24
26
class
INVENTOR_SHADER_API
SoMFShaderObject
:
public
SoMField
27
{
28
typedef
SoMField inherited;
29
30
SO_MFIELD_HEADER(
SoMFShaderObject
,
SoShaderObject
*,
SoShaderObject
*);
31
32
public
:
34
void
addShader
(
SoShaderObject
* shader);
35
37
void
insertShader
(
SoShaderObject
* shader,
int
newShaderIndex);
38
40
SoShaderObject
*
getShader
(
int
index)
const
;
41
43
SoNodeList
getShaderList
()
const
;
44
46
int
findShader
(
const
SoShaderObject
* shader)
const
;
47
49
int
getNumShaders
()
const
;
50
52
void
removeShader
(
int
index);
53
55
void
removeShader
(
SoShaderObject
* shader)
56
{
57
removeShader
(
findShader
(shader));
58
}
59
61
void
removeAllShaders
();
62
64
void
replaceShader
(
int
index,
SoShaderObject
* newShader);
65
67
void
replaceShader
(
SoShaderObject
* oldShader,
SoShaderObject
* newShader)
68
{
69
replaceShader
(
findShader
(oldShader), newShader);
70
}
71
72
SoINTERNAL public :
73
75
static
void
initClass
();
76
78
void
fixCopy
(SbBool copyConnections)
override
;
79
81
SbBool
referencesCopy
()
const override
;
82
83
private
:
85
void
countWriteRefs(SoOutput* out)
const override
;
86
89
void
setVal(
int
index,
SoShaderObject
* newValue);
90
};
91
92
#endif
// _SO_MF_SHADER_OBJECT_
SoShaderSystem.h
INVENTOR_SHADER_API
#define INVENTOR_SHADER_API
Define class export specifier.
Definition
SoShaderSystem.h:20
SoMFShaderObject
Open Inventor multiple field managing a list of shader objects.
Definition
SoMFShaderObject.h:27
SoMFShaderObject::addShader
void addShader(SoShaderObject *shader)
Add vertex or fragment shader.
SoMFShaderObject::getShaderList
SoNodeList getShaderList() const
Return list of managed shaders.
SoMFShaderObject::replaceShader
void replaceShader(int index, SoShaderObject *newShader)
Replace shader at given index with new one.
SoMFShaderObject::initClass
static void initClass()
Initialize class with runtime type system.
SoMFShaderObject::replaceShader
void replaceShader(SoShaderObject *oldShader, SoShaderObject *newShader)
Replace shader with new one using given pointer.
Definition
SoMFShaderObject.h:67
SoMFShaderObject::removeShader
void removeShader(int index)
Remove shader at given index.
SoMFShaderObject::removeAllShaders
void removeAllShaders()
Remove all shaders from the field.
SoMFShaderObject::removeShader
void removeShader(SoShaderObject *shader)
Remove shader using given pointer.
Definition
SoMFShaderObject.h:55
SoMFShaderObject::insertShader
void insertShader(SoShaderObject *shader, int newShaderIndex)
Insert shader at given index.
SoMFShaderObject::getShader
SoShaderObject * getShader(int index) const
Get shader at given index.
SoMFShaderObject::getNumShaders
int getNumShaders() const
Return number of shaders managed by the field.
SoMFShaderObject::findShader
int findShader(const SoShaderObject *shader) const
Find shader using given pointer.
SoMFShaderObject::fixCopy
void fixCopy(SbBool copyConnections) override
Update a copied field to use the copy of each node if there is one.
SoMFShaderObject::referencesCopy
SbBool referencesCopy() const override
Override this to also check the stored nodes.
SoShaderObject
Abstract Open Inventor node for vertex or fragment shader nodes.
Definition
SoShaderObject.h:31
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
fields
SoMFShaderObject.h
Generated by
1.18.0