-
Notifications
You must be signed in to change notification settings - Fork 0
/
fn_blends.h
75 lines (52 loc) · 1.65 KB
/
fn_blends.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef gd_fastnoise2_FNBLENDS_H
#define gd_fastnoise2_FNBLENDS_H
#include "fn_generator.h"
#include "FastNoise2/include/FastNoise/Generators/Blends.h"
namespace _FastNoise = FastNoise;
class FNOpSourceLHS : public FNGenerator {
GDCLASS(FNOpSourceLHS, FNGenerator)
public:
FNOpSourceLHS();
void set_lhs(FNGenerator* gen) { _node->SetLHS(gen->_get_smart_node()); }
void set_rhs(FNGenerator* gen) { _node->SetRHS(gen->_get_smart_node()); }
void set_rhs_val(float value) { _node->SetRHS(value); }
virtual _FastNoise::SmartNode<_FastNoise::Generator> _get_smart_node() const override {
return _node;
}
protected:
static void _bind_methods();
_FastNoise::SmartNode<_FastNoise::OperatorSourceLHS> _node;
};
class FNOpHybridLHS : public FNGenerator {
GDCLASS(FNOpHybridLHS, FNGenerator)
public:
FNOpHybridLHS();
void set_lhs(FNGenerator* gen) { _node->SetLHS(gen->_get_smart_node()); }
void set_lhs_val(float value) { _node->SetLHS(value); }
void set_rhs(FNGenerator* gen) { _node->SetRHS(gen->_get_smart_node()); }
void set_rhs_val(float value) { _node->SetRHS(value); }
protected:
static void _bind_methods();
_FastNoise::SmartNode<_FastNoise::OperatorHybridLHS> _node;
};
class FNAdd : public FNOpSourceLHS {
GDCLASS(FNAdd, FNOpSourceLHS)
public:
FNAdd();
};
class FNSubtract : public FNOpHybridLHS {
GDCLASS(FNSubtract, FNOpHybridLHS)
public:
FNSubtract();
};
class FNMultiply : public FNOpSourceLHS {
GDCLASS(FNMultiply, FNOpSourceLHS)
public:
FNMultiply();
};
class FNDivide : public FNOpHybridLHS {
GDCLASS(FNDivide, FNOpHybridLHS)
public:
FNDivide();
};
#endif