OpenShaderDesigner 0.0.1
Loading...
Searching...
No Matches
Vector.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 VECTORMATHS_H
20#define VECTORMATHS_H
21
22#include <Graph/ShaderGraph.h>
23
24namespace OpenShaderDesigner::Nodes::VectorMath
25{
26
27// Header Colors =======================================================================================================
28
29inline static constexpr ImColor HeaderColor = ImColor(0xA7, 0x62, 0x53);
30inline static constexpr ImColor HeaderHoveredColor = ImColor(0xC5, 0x79, 0x67);
31inline static constexpr ImColor HeaderActiveColor = ImColor(0x82, 0x4C, 0x40);
32
33inline static const std::string HeaderMarker = "\uF3B9 ";
34
35// =====================================================================================================================
36// Vector Utilities
37// =====================================================================================================================
38
39
40// Make Vector ---------------------------------------------------------------------------------------------------------
41
42struct MakeVector : public Node
43{
44 MakeVector(ShaderGraph& graph, ImVec2 pos);
45 ~MakeVector() override = default;
46
47 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
48 void Inspect() override;
49
50 std::string GetCode() const override;
51};
52
53
54// Break Vector ---------------------------------------------------------------------------------------------------------
55
56struct BreakVector : public Node
57{
58 BreakVector(ShaderGraph& graph, ImVec2 pos);
59 ~BreakVector() override = default;
60
61 [[nodiscard]] Node* Copy(ShaderGraph& graph) const override;
62 void Inspect() override;
63
64 std::string GetCode() const override;
65};
66
67}
68
69#endif //VECTORMATHS_H
Definition ShaderGraph.h:246
Definition ShaderGraph.h:142