MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoSamplerInfoElement.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_SAMPLER_INFO_ELEMENT_H
14
#define SO_SAMPLER_INFO_ELEMENT_H
15
16
18
19
#include "
SoShaderSystem.h
"
20
#include <Inventor/elements/SoAccumulatedElement.h>
21
#include <climits>
22
#include <list>
23
25
class
SbSamplerInfo
26
{
27
public
:
29
enum
TextureType
{
30
TT_FLOAT
,
31
TT_INTEGER
,
32
};
33
35
SbString
name
;
37
SbBool
valid
;
39
TextureType
type
;
40
41
SbSamplerInfo
()
42
{
43
valid
= FALSE;
44
}
45
SbSamplerInfo
(
const
SbString& aName,
TextureType
aType)
46
{
47
this->valid = TRUE;
48
this->name = aName;
49
this->type = aType;
50
}
51
52
SbBool
isValid
()
const
53
{
54
return
valid
;
55
}
56
57
int
operator==
(
const
SbSamplerInfo
& i)
const
58
{
59
return
(
name
== i.
name
);
60
}
61
};
62
64
class
INVENTOR_SHADER_API
SoSamplerInfoElement
:
public
SoAccumulatedElement
65
{
66
typedef
SoAccumulatedElement inherited;
67
68
SO_ELEMENT_HEADER(
SoSamplerInfoElement
);
69
70
public
:
72
void
init
(SoState* state)
override
;
73
75
static
void
add
(SoState* state, SoNode* node,
const
SbSamplerInfo
& info);
76
78
static
void
set
(SoState* state, SoNode* node,
const
SbSamplerInfo
& info);
79
81
static
void
clear
(SoState* state, SoNode* node);
82
84
static
const
SbSamplerInfo
&
get
(SoState* state);
85
87
void
push
(SoState* state)
override
;
88
89
SoINTERNAL public :
90
92
static
void
initClass
();
93
94
protected
:
96
std::list<SbSamplerInfo>
_info
;
97
};
98
99
#endif
// _SO_SAMPLER_INFO_ELEMENT_
SoShaderSystem.h
INVENTOR_SHADER_API
#define INVENTOR_SHADER_API
Define class export specifier.
Definition
SoShaderSystem.h:20
SbSamplerInfo
Open Inventor data type and element to store information about a (list of) SbSampler.
Definition
SoSamplerInfoElement.h:26
SbSamplerInfo::isValid
SbBool isValid() const
Definition
SoSamplerInfoElement.h:52
SbSamplerInfo::TextureType
TextureType
Texture type.
Definition
SoSamplerInfoElement.h:29
SbSamplerInfo::TT_FLOAT
@ TT_FLOAT
Definition
SoSamplerInfoElement.h:30
SbSamplerInfo::TT_INTEGER
@ TT_INTEGER
Definition
SoSamplerInfoElement.h:31
SbSamplerInfo::operator==
int operator==(const SbSamplerInfo &i) const
Definition
SoSamplerInfoElement.h:57
SbSamplerInfo::type
TextureType type
Texture type.
Definition
SoSamplerInfoElement.h:39
SbSamplerInfo::name
SbString name
Sampler name.
Definition
SoSamplerInfoElement.h:35
SbSamplerInfo::SbSamplerInfo
SbSamplerInfo()
Definition
SoSamplerInfoElement.h:41
SbSamplerInfo::valid
SbBool valid
Default is invalid.
Definition
SoSamplerInfoElement.h:37
SbSamplerInfo::SbSamplerInfo
SbSamplerInfo(const SbString &aName, TextureType aType)
Definition
SoSamplerInfoElement.h:45
SoSamplerInfoElement
Element stores information about all current sampler nodes.
Definition
SoSamplerInfoElement.h:65
SoSamplerInfoElement::add
static void add(SoState *state, SoNode *node, const SbSamplerInfo &info)
Add info about sampler to list.
SoSamplerInfoElement::clear
static void clear(SoState *state, SoNode *node)
Clear list.
SoSamplerInfoElement::push
void push(SoState *state) override
Override push() method.
SoSamplerInfoElement::set
static void set(SoState *state, SoNode *node, const SbSamplerInfo &info)
Truncate info list to zero length and set only this info.
SoSamplerInfoElement::get
static const SbSamplerInfo & get(SoState *state)
Returns last sampler info.
SoSamplerInfoElement::_info
std::list< SbSamplerInfo > _info
sampler info.
Definition
SoSamplerInfoElement.h:96
SoSamplerInfoElement::initClass
static void initClass()
Initialize class with runtime type system.
SoSamplerInfoElement::init
void init(SoState *state) override
Initialize element.
MeVisLab
Standard
Sources
Inventor
SoShader
Inventor
elements
SoSamplerInfoElement.h
Generated by
1.18.0