Pixelpart 1.9.0
Godot Plugin
Loading...
Searching...
No Matches
PixelpartAnimatedPropertyFloat3.h
1#ifndef PIXELPART_ANIMATED_PROPERTY_FLOAT3_H
2#define PIXELPART_ANIMATED_PROPERTY_FLOAT3_H
3
4#include "PixelpartAnimatedProperty.h"
5#include <godot_cpp/core/binder_common.hpp>
6#include <godot_cpp/classes/ref.hpp>
7#include <pixelpart-runtime/common/Types.h>
8#include <pixelpart-runtime/effect/AnimatedProperty.h>
9
10namespace godot {
18class PixelpartAnimatedPropertyFloat3 : public PixelpartAnimatedProperty {
19 GDCLASS(PixelpartAnimatedPropertyFloat3, PixelpartAnimatedProperty)
20
21public:
22 PixelpartAnimatedPropertyFloat3();
23
24#ifdef DOXYGEN
29#endif
30
31 void init(pixelpart::AnimatedProperty<pixelpart::float3_t>* prop);
32
39 Vector3 at(float position) const;
40
47 void add_keyframe(float position, Vector3 value);
48
54 void remove_keyframe(int index);
55
62 void set_keyframe_value(int index, Vector3 value);
63
70 void set_keyframe_position(int index, float position);
71
76 void clear_keyframes();
77
83 bool contains_keyframes() const;
84
90 int get_keyframe_count() const;
91
98 Vector3 get_keyframe_value(int index) const;
99
107 int get_keyframe_index(float position, float epsilon);
108
115
122
123protected:
124 static void _bind_methods();
125
126private:
127 pixelpart::AnimatedProperty<pixelpart::float3_t>* property = nullptr;
128};
129}
130
131#endif
InterpolationType keyframe_interpolation
Interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.h:28
void set_keyframe_interpolation(InterpolationType method)
Set interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.cpp:82
void set_keyframe_value(int index, Vector3 value)
Change the value of the keyframe with the given index.
Definition PixelpartAnimatedPropertyFloat3.cpp:34
Vector3 get_keyframe_value(int index) const
Return the value of the keyframe with the given index.
Definition PixelpartAnimatedPropertyFloat3.cpp:64
void add_keyframe(float position, Vector3 value)
Add a keyframe at time position with value value.
Definition PixelpartAnimatedPropertyFloat3.cpp:23
void clear_keyframes()
Remove all keyframes from the animation.
Definition PixelpartAnimatedPropertyFloat3.cpp:44
void set_keyframe_position(int index, float position)
Move the time of the keyframe with the given index to position.
Definition PixelpartAnimatedPropertyFloat3.cpp:39
Vector3 at(float position) const
Return the (interpolated) value of the animation property at time position.
Definition PixelpartAnimatedPropertyFloat3.cpp:15
void remove_keyframe(int index)
Remove the keyframe with the given index from the animation.
Definition PixelpartAnimatedPropertyFloat3.cpp:29
InterpolationType get_keyframe_interpolation() const
Return interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.cpp:87
int get_keyframe_count() const
Return the number of keyframes.
Definition PixelpartAnimatedPropertyFloat3.cpp:57
bool contains_keyframes() const
Return whether the animation property contains any keyframes.
Definition PixelpartAnimatedPropertyFloat3.cpp:50
int get_keyframe_index(float position, float epsilon)
Return the index of the keyframe closest to time position.
Definition PixelpartAnimatedPropertyFloat3.cpp:72
Base class for properties animated with keyframes and affected by effect inputs.
Definition PixelpartAnimatedProperty.h:15
InterpolationType
Keyframe interpolation types.
Definition PixelpartAnimatedProperty.h:22