MaterialX
1.38.2
source
MaterialXGenShader
Nodes
IfNode.h
1
//
2
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3
// All rights reserved. See LICENSE.txt for license.
4
//
5
6
#ifndef MATERIALX_IFNODE_H
7
#define MATERIALX_IFNODE_H
8
9
#include <
MaterialXGenShader/ShaderNodeImpl.h
>
10
11
namespace
MaterialX
12
{
13
16
class
MX_GENSHADER_API
IfNode
:
public
ShaderNodeImpl
17
{
18
public
:
19
void
emitFunctionCall(
const
ShaderNode
& node,
GenContext
& context,
ShaderStage
& stage)
const override
;
20
21
private
:
23
virtual
const
string
& equalityString()
const
= 0;
24
25
static
const
StringVec
INPUT_NAMES;
26
};
27
30
class
MX_GENSHADER_API
IfGreaterNode
:
public
IfNode
31
{
32
public
:
33
static
ShaderNodeImplPtr
create();
34
private
:
35
const
string
& equalityString()
const override
36
{
37
return
EQUALITY_STRING;
38
}
39
static
string
EQUALITY_STRING;
40
};
41
44
class
MX_GENSHADER_API
IfGreaterEqNode
:
public
IfNode
45
{
46
public
:
47
static
ShaderNodeImplPtr
create();
48
private
:
49
const
string
& equalityString()
const override
50
{
51
return
EQUALITY_STRING;
52
}
53
static
string
EQUALITY_STRING;
54
};
55
58
class
MX_GENSHADER_API
IfEqualNode
:
public
IfNode
59
{
60
public
:
61
static
ShaderNodeImplPtr
create();
62
private
:
63
const
string
& equalityString()
const override
64
{
65
return
EQUALITY_STRING;
66
}
67
static
string
EQUALITY_STRING;
68
};
69
70
}
// namespace MaterialX
71
72
#endif
MaterialX::StringVec
vector< string > StringVec
A vector of strings.
Definition:
Library.h:56
MaterialX::ShaderNodeImplPtr
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition:
Library.h:40
ShaderNodeImpl.h
Base class for shader node implementations.
MaterialX::GenContext
A context class for shader generation.
Definition:
GenContext.h:27
MaterialX::IfEqualNode
"ifequal" node implementation
Definition:
IfNode.h:59
MaterialX::IfGreaterEqNode
"ifgreatereq" node implementation
Definition:
IfNode.h:45
MaterialX::IfGreaterNode
"ifgreater" node implementation
Definition:
IfNode.h:31
MaterialX::IfNode
Abstract base class for implementions which handle if conditions.
Definition:
IfNode.h:17
MaterialX::ShaderNode
Class representing a node in the shader generation DAG.
Definition:
ShaderNode.h:326
MaterialX::ShaderNodeImpl
Class handling the shader generation implementation for a node.
Definition:
ShaderNodeImpl.h:32
MaterialX::ShaderStage
A shader stage, containing the state and resulting source code for the stage.
Definition:
ShaderStage.h:124
Generated by
1.9.3