1#ifndef PIXELPART_PARTICLE_TYPE_H
2#define PIXELPART_PARTICLE_TYPE_H
4#include "../property/PixelpartStaticPropertyFloat.h"
5#include "../property/PixelpartStaticPropertyFloat3.h"
6#include "../property/PixelpartStaticPropertyFloat4.h"
7#include "../property/PixelpartAnimatedPropertyFloat.h"
8#include "../property/PixelpartAnimatedPropertyFloat3.h"
9#include "../property/PixelpartAnimatedPropertyFloat4.h"
10#include <pixelpart-runtime/effect/ParticleType.h>
11#include <pixelpart-runtime/engine/EffectEngine.h>
12#include <godot_cpp/classes/ref_counted.hpp>
33class PixelpartParticleType :
public RefCounted {
34 GDCLASS(PixelpartParticleType, RefCounted)
37 PixelpartParticleType();
38 virtual ~PixelpartParticleType();
81 void init(pixelpart::ParticleType* particleTypePtr, pixelpart::EffectEngine* effectEnginePtr);
153 Ref<PixelpartStaticPropertyFloat3>
get_pivot()
const;
199 Ref<PixelpartAnimatedPropertyFloat>
get_count()
const;
206 Ref<PixelpartAnimatedPropertyFloat>
get_lifespan()
const;
250 Ref<PixelpartAnimatedPropertyFloat3>
get_position()
const;
257 Ref<PixelpartAnimatedPropertyFloat3>
get_size()
const;
264 Ref<PixelpartAnimatedPropertyFloat3>
get_stretch()
const;
280 Ref<PixelpartAnimatedPropertyFloat3>
get_rotation()
const;
308 Ref<PixelpartAnimatedPropertyFloat>
get_weight()
const;
315 Ref<PixelpartAnimatedPropertyFloat>
get_bounce()
const;
322 Ref<PixelpartAnimatedPropertyFloat>
get_friction()
const;
329 Ref<PixelpartAnimatedPropertyFloat4>
get_color()
const;
336 Ref<PixelpartAnimatedPropertyFloat>
get_opacity()
const;
388 static void _bind_methods();
391 pixelpart::ParticleType* particleType =
nullptr;
392 pixelpart::EffectEngine* effectEngine =
nullptr;
Ref< PixelpartStaticPropertyFloat > get_size_variance() const
How much the size varies between particles.
Definition PixelpartParticleType.cpp:344
bool is_position_relative() const
Whether the position of particles is tied to the position of the emitter.
Definition PixelpartParticleType.cpp:35
void set_position_relative(bool mode)
Set whether the position of particles is tied to the position of the emitter.
Definition PixelpartParticleType.cpp:28
Ref< PixelpartAnimatedPropertyFloat > get_physical_size() const
Relative size of each particle for motion and collision calculations over its lifetime.
Definition PixelpartParticleType.cpp:222
Ref< PixelpartAnimatedPropertyFloat > get_acceleration() const
Linear acceleration applied to each particle over its lifetime.
Definition PixelpartParticleType.cpp:255
Ref< PixelpartAnimatedPropertyFloat > get_friction() const
How resistant each particle is to sliding down colliders over its lifetime.
Definition PixelpartParticleType.cpp:299
int get_rotation_mode() const
Whether the rotation property represents the exact rotation of particles or their angular velocity.
Definition PixelpartParticleType.cpp:46
int get_id() const
ID of the particle type.
Definition PixelpartParticleType.cpp:18
Ref< PixelpartStaticPropertyFloat > get_velocity_variance() const
How much the speed varies between particles.
Definition PixelpartParticleType.cpp:377
Ref< PixelpartAnimatedPropertyFloat > get_inherited_velocity() const
How much speed particles inherit from the parent particle or emitter.
Definition PixelpartParticleType.cpp:166
Ref< PixelpartStaticPropertyFloat > get_lifespan_variance() const
How much the lifespan varies between particles.
Definition PixelpartParticleType.cpp:333
int get_alignment_mode() const
Direction to which particles are aligned.
Definition PixelpartParticleType.cpp:59
void set_layer(int layer)
Set layer particles are drawn on.
Definition PixelpartParticleType.cpp:100
Ref< PixelpartStaticPropertyFloat4 > get_color_variance() const
How much the color varies between particles.
Definition PixelpartParticleType.cpp:388
Ref< PixelpartAnimatedPropertyFloat3 > get_position() const
Motion path for particles.
Definition PixelpartParticleType.cpp:189
int layer
Layer particles are drawn on.
Definition PixelpartParticleType.h:78
Ref< PixelpartAnimatedPropertyFloat > get_bounce() const
How much each particle bounces back from colliders over its lifetime.
Definition PixelpartParticleType.cpp:288
void set_visible(bool mode)
Set whether particles of this type are visible.
Definition PixelpartParticleType.cpp:89
Ref< PixelpartStaticPropertyFloat3 > get_pivot() const
Center of rotation relative to the particle’s center.
Definition PixelpartParticleType.cpp:65
int get_layer() const
Layer particles are drawn on.
Definition PixelpartParticleType.cpp:107
Ref< PixelpartAnimatedPropertyFloat > get_count() const
How many particles of this type are spawned by emitters.
Definition PixelpartParticleType.cpp:111
Ref< PixelpartAnimatedPropertyFloat > get_initial_velocity() const
How fast each particle is initially after being spawned by the emitter.
Definition PixelpartParticleType.cpp:155
bool is_visible() const
Whether particles of this type are visible.
Definition PixelpartParticleType.cpp:96
Ref< PixelpartAnimatedPropertyFloat3 > get_size() const
Size of each particle over its lifetime as a fraction of its initial size.
Definition PixelpartParticleType.cpp:200
int get_parent_id() const
ID of the parent particle type.
Definition PixelpartParticleType.cpp:21
Ref< PixelpartAnimatedPropertyFloat > get_initial_opacity() const
Opacity of each particle when created.
Definition PixelpartParticleType.cpp:177
Ref< PixelpartAnimatedPropertyFloat > get_weight() const
How strongly each particle is affected by force fields over its lifetime.
Definition PixelpartParticleType.cpp:277
String get_name() const
Name of the particle type.
Definition PixelpartParticleType.cpp:24
bool position_relative
Whether the position of particles is tied to the position of the emitter.
Definition PixelpartParticleType.h:44
Ref< PixelpartAnimatedPropertyFloat > get_lifespan() const
How long particles exist after being spawned by emitters.
Definition PixelpartParticleType.cpp:122
Ref< PixelpartStaticPropertyFloat3 > get_rotation_variance() const
How much the rotation varies between particles, in degrees.
Definition PixelpartParticleType.cpp:355
Ref< PixelpartStaticPropertyFloat3 > get_angular_velocity_variance() const
How much the angular velocity varies between particles, in degrees/second.
Definition PixelpartParticleType.cpp:366
bool visible
Whether particles of this type are visible.
Definition PixelpartParticleType.h:71
void set_alignment_mode(int mode)
Set direction to which particles are aligned.
Definition PixelpartParticleType.cpp:52
Ref< PixelpartAnimatedPropertyFloat3 > get_initial_rotation() const
Rotation of each particle when created, in degrees.
Definition PixelpartParticleType.cpp:144
Ref< PixelpartAnimatedPropertyFloat3 > get_rotation_by_speed() const
How much particles rotate based on their velocity, in degrees.
Definition PixelpartParticleType.cpp:244
Ref< PixelpartAnimatedPropertyFloat > get_radial_acceleration() const
Acceleration of each particle towards the emitter over its lifetime.
Definition PixelpartParticleType.cpp:266
Ref< PixelpartAnimatedPropertyFloat > get_initial_size() const
Size of each particle when created.
Definition PixelpartParticleType.cpp:133
int rotation_mode
Whether the rotation property represents the exact rotation of particles or their angular velocity.
Definition PixelpartParticleType.h:54
Ref< PixelpartAnimatedPropertyFloat3 > get_rotation() const
How particles rotate over time from their initial rotation, in degrees.
Definition PixelpartParticleType.cpp:233
Ref< PixelpartAnimatedPropertyFloat > get_opacity() const
Opacity of each particle over its lifetime as a fraction of its initial opacity.
Definition PixelpartParticleType.cpp:321
int alignment_mode
Direction to which particles are aligned.
Definition PixelpartParticleType.h:66
Ref< PixelpartAnimatedPropertyFloat4 > get_color() const
Color of each particle over its lifetime.
Definition PixelpartParticleType.cpp:310
Ref< PixelpartStaticPropertyFloat > get_opacity_variance() const
How much the opacity varies between particles.
Definition PixelpartParticleType.cpp:399
Ref< PixelpartAnimatedPropertyFloat3 > get_stretch() const
How much particles are stretched based on their speed.
Definition PixelpartParticleType.cpp:211
void set_rotation_mode(int mode)
Set whether the rotation property represents the exact rotation of particles or their angular velocit...
Definition PixelpartParticleType.cpp:39
Ref< PixelpartStaticPropertyFloat > get_motion_path_force() const
How much particles are influenced by the motion path.
Definition PixelpartParticleType.cpp:77