OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
Trigonometry.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 TRIGONOMETRY_H
20#define TRIGONOMETRY_H
21
22#include <Graph/Nodes/Math/Functions.h>
23
24namespace OpenShaderDesigner::Nodes::Math
25{
26
27// =====================================================================================================================
28// Trigonometry
29// =====================================================================================================================
30
31
32// Sine ----------------------------------------------------------------------------------------------------------------
33
34struct Sine : public MathOp
35{
36 Sine(ShaderGraph& graph, ImVec2 pos);
37 ~Sine() 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// Cosine ----------------------------------------------------------------------------------------------------------------
47
48struct Cosine : public MathOp
49{
50 Cosine(ShaderGraph& graph, ImVec2 pos);
51 ~Cosine() override = default;
52
53 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
54 void Inspect() override;
55
56 std::string GetCode() const override;
57};
58
59
60// Tangent ----------------------------------------------------------------------------------------------------------------
61
62struct Tangent : public MathOp
63{
64 Tangent(ShaderGraph& graph, ImVec2 pos);
65 ~Tangent() override = default;
66
67 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
68 void Inspect() override;
69
70 std::string GetCode() const override;
71};
72
73
74// ArcSine ----------------------------------------------------------------------------------------------------------------
75
76struct ArcSine : public MathOp
77{
78 ArcSine(ShaderGraph& graph, ImVec2 pos);
79 ~ArcSine() override = default;
80
81 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
82 void Inspect() override;
83
84 std::string GetCode() const override;
85};
86
87
88// ArcCosine ----------------------------------------------------------------------------------------------------------------
89
90struct ArcCosine : public MathOp
91{
92 ArcCosine(ShaderGraph& graph, ImVec2 pos);
93 ~ArcCosine() override = default;
94
95 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
96 void Inspect() override;
97
98 std::string GetCode() const override;
99};
100
101
102// ArcTangent ----------------------------------------------------------------------------------------------------------------
103
104struct ArcTangent : public MathOp
105{
106 ArcTangent(ShaderGraph& graph, ImVec2 pos);
107 ~ArcTangent() override = default;
108
109 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
110 void Inspect() override;
111
112 std::string GetCode() const override;
113};
114
115}
116
117#endif //TRIGONOMETRY_H
Definition ShaderGraph.h:246
Definition ShaderGraph.h:142
Definition Trigonometry.h:91
Definition Trigonometry.h:77
Definition Trigonometry.h:105
Definition Trigonometry.h:49
Definition Trigonometry.h:35
Definition Trigonometry.h:63