pandemonium_engine/modules/material_maker/nodes/simple/curve.h

54 lines
1.1 KiB
C++
Raw Normal View History

2022-06-17 10:55:37 +02:00
#ifndef MM_CURVE_H
#define MM_CURVE_H
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
#include "../mm_node.h"
#include "../mm_node_universal_property.h"
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
class MMCurve : public MMNode {
GDCLASS(MMCurve, MMNode);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
public:
Ref<MMNodeUniversalProperty> get_image();
void set_image(const Ref<MMNodeUniversalProperty> &val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
Ref<MMNodeUniversalProperty> get_input();
void set_input(const Ref<MMNodeUniversalProperty> &val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
Vector2 get_a();
void set_a(const Vector2 &val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
Vector2 get_b();
void set_b(const Vector2 &val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
Vector2 get_c();
void set_c(const Vector2 &val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
float get_width() const;
void set_width(const float val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
int get_repeat() const;
void set_repeat(const int val);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
void _init_properties();
void _register_methods(MMGraphNode *mm_graph_node);
Color _get_value_for(const Vector2 &uv, const int pseed);
void _render(const Ref<MMMaterial> &material);
Vector2 transform_uv(const Vector2 &uv);
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
MMCurve();
~MMCurve();
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
protected:
static void _bind_methods();
2022-06-16 15:29:08 +02:00
2022-06-17 10:55:37 +02:00
Ref<MMNodeUniversalProperty> image;
Ref<MMNodeUniversalProperty> input;
Vector2 a;
Vector2 b;
Vector2 c;
float width;
int repeat;
2022-06-16 15:29:08 +02:00
};
#endif