Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
PixelpartAccelerationField.h
1#ifndef PIXELPART_ACCELERATION_FIELD_H
2#define PIXELPART_ACCELERATION_FIELD_H
3
4#include "PixelpartForceField.h"
5#include "../property/PixelpartAnimatedPropertyFloat.h"
6#include "../property/PixelpartAnimatedPropertyFloat3.h"
7#include <pixelpart-runtime/effect/AccelerationField.h>
8#include <random>
9
10namespace godot {
18class PixelpartAccelerationField : public PixelpartForceField {
19 GDCLASS(PixelpartAccelerationField, PixelpartForceField)
20
21public:
22 PixelpartAccelerationField();
23 virtual ~PixelpartAccelerationField();
24
25 virtual void init(pixelpart::Node* internalNode, pixelpart::EffectEngine* effectEnginePtr) override;
26
33 Ref<PixelpartAnimatedPropertyFloat3> get_acceleration_direction() const;
34
40 Ref<PixelpartAnimatedPropertyFloat> get_acceleration_direction_variance() const;
41
47 Ref<PixelpartAnimatedPropertyFloat> get_acceleration_strength_variance() const;
48
58 void set_acceleration_grid_size(int x, int y, int z);
59
66
73
80
81protected:
82 static void _bind_methods();
83
84private:
85 pixelpart::AccelerationField* accelerationField = nullptr;
86
87 std::mt19937 rng;
88};
89}
90
91#endif
int get_acceleration_grid_size_y() const
The number of grid cells on the Y axis of the force field grid.
Definition PixelpartAccelerationField.cpp:67
void set_acceleration_grid_size(int x, int y, int z)
Set the number of cells in each dimension of the force field grid.
Definition PixelpartAccelerationField.cpp:53
Ref< PixelpartAnimatedPropertyFloat3 > get_acceleration_direction() const
Direction in which particles are accelerated, in degrees. For 3D effects, the direction is composed o...
Definition PixelpartAccelerationField.cpp:19
int get_acceleration_grid_size_x() const
The number of grid cells on the X axis of the force field grid.
Definition PixelpartAccelerationField.cpp:64
Ref< PixelpartAnimatedPropertyFloat > get_acceleration_strength_variance() const
How much the force strength varies between cells of the grid.
Definition PixelpartAccelerationField.cpp:41
Ref< PixelpartAnimatedPropertyFloat > get_acceleration_direction_variance() const
How much the force direction varies between cells of the grid.
Definition PixelpartAccelerationField.cpp:30
int get_acceleration_grid_size_z() const
The number of grid cells on the Z axis of the force field grid.
Definition PixelpartAccelerationField.cpp:70