OpenShaderDesigner
0.0.1
Loading...
Searching...
No Matches
Include
Graph
Nodes
Math
Constants.h
1
// =====================================================================================================================
2
// OpenShaderDesigner, an open source software utility to create materials and shaders.
3
// Copyright (C) 2024 Medusa Slockbower
4
//
5
// This program is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program. If not, see <https://www.gnu.org/licenses/>.
17
// =====================================================================================================================
18
19
#ifndef CONSTANTS_H
20
#define CONSTANTS_H
21
22
#include <Graph/Nodes/Math/Functions.h>
23
24
namespace
OpenShaderDesigner::Nodes::Math
25
{
26
27
// =====================================================================================================================
28
// Constants
29
// =====================================================================================================================
30
31
32
// Integer -------------------------------------------------------------------------------------------------------------
33
34
struct
Integer
:
public
Node
35
{
36
Integer
(
ShaderGraph
& graph, ImVec2 pos);
37
~Integer
()
override
=
default
;
38
39
[[nodiscard]]
Node
* Copy(
ShaderGraph
& graph)
const override
;
40
void
Inspect()
override
;
41
42
std::string GetCode()
const override
;
43
};
44
45
46
// Unsigned Integer ----------------------------------------------------------------------------------------------------
47
48
struct
UnsignedInteger
:
public
Node
49
{
50
using
ValueType = ocu::any<int, unsigned int, float, glm::vec4>;
51
52
UnsignedInteger
(
ShaderGraph
& graph, ImVec2 pos);
53
~UnsignedInteger
()
override
=
default
;
54
55
[[nodiscard]]
Node
* Copy(
ShaderGraph
& graph)
const override
;
56
void
Inspect()
override
;
57
58
std::string GetCode()
const override
;
59
};
60
61
62
// Scalar --------------------------------------------------------------------------------------------------------------
63
64
struct
Scalar
:
public
Node
65
{
66
using
ValueType = ocu::any<int, unsigned int, float, glm::vec4>;
67
68
Scalar
(
ShaderGraph
& graph, ImVec2 pos);
69
~Scalar
()
override
=
default
;
70
71
[[nodiscard]]
Node
* Copy(
ShaderGraph
& graph)
const override
;
72
void
Inspect()
override
;
73
74
std::string GetCode()
const override
;
75
};
76
77
78
// Vector --------------------------------------------------------------------------------------------------------------
79
80
struct
Vector
:
public
Node
81
{
82
using
ValueType = ocu::any<int, unsigned int, float, glm::vec4>;
83
84
Vector
(
ShaderGraph
& graph, ImVec2 pos);
85
~Vector
()
override
=
default
;
86
87
[[nodiscard]]
Node
* Copy(
ShaderGraph
& graph)
const override
;
88
void
Inspect()
override
;
89
90
std::string GetCode()
const override
;
91
};
92
93
}
94
95
#endif
//CONSTANTS_H
OpenShaderDesigner::ShaderGraph
Definition
ShaderGraph.h:246
OpenShaderDesigner::Node
Definition
ShaderGraph.h:142
OpenShaderDesigner::Nodes::Math::Integer
Definition
Constants.h:35
OpenShaderDesigner::Nodes::Math::Scalar
Definition
Constants.h:65
OpenShaderDesigner::Nodes::Math::UnsignedInteger
Definition
Constants.h:49
OpenShaderDesigner::Nodes::Math::Vector
Definition
Constants.h:81
Generated by
1.11.0