1#ifndef PIXELPART_PARTICLE_EMITTER_H
2#define PIXELPART_PARTICLE_EMITTER_H
4#include "PixelpartNode.h"
5#include "../property/PixelpartAnimatedPropertyFloat.h"
6#include "../property/PixelpartAnimatedPropertyFloat3.h"
7#include <pixelpart-runtime/effect/ParticleEmitter.h>
17class PixelpartParticleEmitter :
public PixelpartNode {
18 GDCLASS(PixelpartParticleEmitter, PixelpartNode)
21 PixelpartParticleEmitter();
22 virtual ~PixelpartParticleEmitter();
55 virtual void init(pixelpart::Node* internalNode, pixelpart::EffectEngine* effectEnginePtr)
override;
244 Ref<PixelpartAnimatedPropertyFloat>
get_spread()
const;
247 static void _bind_methods();
250 void set_shape_points(
const std::vector<pixelpart::float3_t>& points);
251 std::vector<pixelpart::float3_t> get_shape_points()
const;
253 pixelpart::ParticleEmitter* particleEmitter =
nullptr;
int get_shape() const
Return shape of the emitter area.
Definition PixelpartParticleEmitter.cpp:27
int get_emission_mode() const
Return the emission mode.
Definition PixelpartParticleEmitter.cpp:135
int direction_mode
Mode to control initial particle direction.
Definition PixelpartParticleEmitter.h:52
void set_shape(int type)
Set shape of the emitter area.
Definition PixelpartParticleEmitter.cpp:20
Ref< PixelpartAnimatedPropertyFloat3 > get_direction() const
Direction in which particles move when spawned, in degrees.
Definition PixelpartParticleEmitter.cpp:157
void set_shape_point(int index, Vector3 point)
Change the location of the point at the given index in the emitter shape.
Definition PixelpartParticleEmitter.cpp:57
int get_grid_size_z() const
Return the number of grid cells in Z direction.
Definition PixelpartParticleEmitter.cpp:125
int get_grid_order() const
Get the grid order of grid distribution modes.
Definition PixelpartParticleEmitter.cpp:102
int get_grid_size_x() const
Return the number of grid cells in X direction.
Definition PixelpartParticleEmitter.cpp:119
void set_distribution(int mode)
Set where particles are spawned inside the emitter area.
Definition PixelpartParticleEmitter.cpp:81
void add_shape_point(Vector3 point)
Add a new point to the emitter shape.
Definition PixelpartParticleEmitter.cpp:34
int grid_order
Grid order of grid distribution modes.
Definition PixelpartParticleEmitter.h:38
void remove_shape_point(int index)
Remove the point at the given index from the emitter shape.
Definition PixelpartParticleEmitter.cpp:44
int get_distribution() const
Return where particles are spawned inside the emitter area.
Definition PixelpartParticleEmitter.cpp:88
int emission_mode
Emission mode to control when particles are created during the lifetime of the emitter.
Definition PixelpartParticleEmitter.h:44
Vector3 get_shape_point(int index) const
Return the location of the point at the given index in the emitter shape.
Definition PixelpartParticleEmitter.cpp:70
int get_direction_mode() const
Get the direction mode.
Definition PixelpartParticleEmitter.cpp:149
int distribution
Where particles are spawned inside the emitter area.
Definition PixelpartParticleEmitter.h:33
int shape
Shape of the emitter area.
Definition PixelpartParticleEmitter.h:28
int get_shape_point_count() const
Return the number of points in the emitter shape.
Definition PixelpartParticleEmitter.cpp:77
Ref< PixelpartAnimatedPropertyFloat > get_spread() const
How much the direction varies.
Definition PixelpartParticleEmitter.cpp:168
void set_direction_mode(int mode)
Set the direction mode.
Definition PixelpartParticleEmitter.cpp:142
int get_grid_size_y() const
Return the number of grid cells in Y direction.
Definition PixelpartParticleEmitter.cpp:122
void set_grid_size(int x, int y, int z)
Set the number of grid cells.
Definition PixelpartParticleEmitter.cpp:109
void set_emission_mode(int mode)
Set the emission mode.
Definition PixelpartParticleEmitter.cpp:128
void set_grid_order(int mode)
Set the grid order of grid distribution modes.
Definition PixelpartParticleEmitter.cpp:95