Pixelpart 1.9.0
Godot Plugin
Loading...
Searching...
No Matches
PixelpartVectorField.h
1#ifndef PIXELPART_VECTOR_FIELD_H
2#define PIXELPART_VECTOR_FIELD_H
3
4#include "PixelpartForceField.h"
5#include "../property/PixelpartAnimatedPropertyFloat.h"
6#include <pixelpart-runtime/effect/VectorField.h>
7
8namespace godot {
14class PixelpartVectorField : public PixelpartForceField {
15 GDCLASS(PixelpartVectorField, PixelpartForceField)
16
17public:
26
31 };
32
34 virtual ~PixelpartVectorField();
35
36#ifdef DOXYGEN
41#endif
42
43 virtual void init(pixelpart::Node* internalNode, pixelpart::EffectEngine* effectEnginePtr) override;
44
50 void set_vector_filter(FilterType filter);
51
58
67 Ref<PixelpartAnimatedPropertyFloat> get_tightness() const;
68
69protected:
70 static void _bind_methods();
71
72private:
73 pixelpart::VectorField* vectorField = nullptr;
74};
75}
76
77VARIANT_ENUM_CAST(PixelpartVectorField::FilterType)
78
79#endif
Force field that accelerates particles in the direction of a predefined grid of vectors.
Definition PixelpartVectorField.h:14
FilterType
Filtering techniques.
Definition PixelpartVectorField.h:21
@ FILTER_NONE
Definition PixelpartVectorField.h:25
@ FILTER_LINEAR
Definition PixelpartVectorField.h:30
Ref< PixelpartAnimatedPropertyFloat > get_tightness() const
How directly particles follow the vectors in the force field.
Definition PixelpartVectorField.cpp:31
FilterType get_vector_filter() const
How velocity values are interpolated between the cells of the vector field.
Definition PixelpartVectorField.cpp:25
FilterType vector_filter
How velocity values are interpolated between the cells of the vector field.
Definition PixelpartVectorField.h:40
void set_vector_filter(FilterType filter)
Set how velocity values are interpolated between the cells of the vector field.
Definition PixelpartVectorField.cpp:18