Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
PixelpartNode.h
1#ifndef PIXELPART_NODE_H
2#define PIXELPART_NODE_H
3
4#include "PixelpartEffectResource.h"
5#include "../property/PixelpartAnimatedPropertyFloat3.h"
6#include <pixelpart-runtime/effect/Node.h>
7#include <pixelpart-runtime/engine/EffectEngine.h>
8#include <godot_cpp/classes/ref_counted.hpp>
9
10namespace godot {
16class PixelpartNode : public RefCounted {
17 GDCLASS(PixelpartNode, RefCounted)
18
19public:
20 PixelpartNode();
21 virtual ~PixelpartNode();
22
23#ifdef DOXYGEN
28
33
37 bool repeat;
38#endif
39
40 virtual void init(pixelpart::Node* internalNode, pixelpart::EffectEngine* effectEnginePtr);
41
47 int get_id() const;
48
54 int get_parent_id() const;
55
61 String get_name() const;
62
68 void set_lifetime_start(float time);
69
75 void set_lifetime_duration(float time);
76
82 void set_repeat(bool value);
83
89 float get_lifetime_start() const;
90
96 float get_lifetime_duration() const;
97
103 bool get_repeat() const;
104
110 bool is_active() const;
111
117 float get_local_time() const;
118
124 Ref<PixelpartAnimatedPropertyFloat3> get_position() const;
125
133 Ref<PixelpartAnimatedPropertyFloat3> get_rotation() const;
134
140 Ref<PixelpartAnimatedPropertyFloat3> get_scale() const;
141
142protected:
143 static void _bind_methods();
144
145 pixelpart::Node* node = nullptr;
146 pixelpart::EffectEngine* effectEngine = nullptr;
147};
148}
149
150#endif
bool repeat
Wether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.h:37
bool get_repeat() const
Wether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.cpp:63
float get_lifetime_start() const
Time in seconds until the node becomes active.
Definition PixelpartNode.cpp:49
float lifetime_duration
How long the node stays active in seconds.
Definition PixelpartNode.h:32
Ref< PixelpartAnimatedPropertyFloat3 > get_rotation() const
Rotation of the node in degrees.
Definition PixelpartNode.cpp:96
bool is_active() const
Return whether the node is active at the current point in time.
Definition PixelpartNode.cpp:70
int get_id() const
ID of the node.
Definition PixelpartNode.cpp:18
void set_repeat(bool value)
Set whether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.cpp:42
float get_local_time() const
Return the time fraction the emitter has been active for, in range 0.0 (0%) to 1.0 (100%).
Definition PixelpartNode.cpp:77
Ref< PixelpartAnimatedPropertyFloat3 > get_position() const
Position of the node.
Definition PixelpartNode.cpp:85
int get_parent_id() const
ID of the node's parent.
Definition PixelpartNode.cpp:21
void set_lifetime_start(float time)
Set time until the node becomes active.
Definition PixelpartNode.cpp:28
float lifetime_start
Time in seconds until the node becomes active.
Definition PixelpartNode.h:27
void set_lifetime_duration(float time)
Set how long the node stays active in seconds.
Definition PixelpartNode.cpp:35
float get_lifetime_duration() const
How long the node is active in seconds.
Definition PixelpartNode.cpp:56
Ref< PixelpartAnimatedPropertyFloat3 > get_scale() const
Size of the node.
Definition PixelpartNode.cpp:107
String get_name() const
Name of the node.
Definition PixelpartNode.cpp:24