Pixelpart 1.8.2
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 <godot_cpp/core/binder_common.hpp>
5#include <godot_cpp/classes/ref.hpp>
6#include <pixelpart-runtime/common/Math.h>
7#include <pixelpart-runtime/effect/AnimatedProperty.h>
8
9namespace godot {
17class PixelpartAnimatedPropertyFloat3 : public RefCounted {
18 GDCLASS(PixelpartAnimatedPropertyFloat3, RefCounted)
19
20public:
21 PixelpartAnimatedPropertyFloat3();
22
23#ifdef DOXYGEN
28#endif
29
30 void init(pixelpart::AnimatedProperty<pixelpart::float3_t>* prop);
31
38 Vector3 at(float position) const;
39
46 void add_keyframe(float position, Vector3 value);
47
53 void remove_keyframe(int index);
54
61 void set_keyframe_value(int index, Vector3 value);
62
69 void set_keyframe_position(int index, float position);
70
75 void clear_keyframes();
76
82 bool contains_keyframes() const;
83
89 int get_keyframe_count() const;
90
97 Vector3 get_keyframe_value(int index) const;
98
106 int get_keyframe_index(float position, float epsilon);
107
113 void set_keyframe_interpolation(int method);
114
120 int get_keyframe_interpolation() const;
121
127
133 void enable_fixed_cache(int size);
134
135protected:
136 static void _bind_methods();
137
138private:
139 pixelpart::AnimatedProperty<pixelpart::float3_t>* property = nullptr;
140};
141}
142
143#endif
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 enable_fixed_cache(int size)
Enable a fixed cache with the given size, which only stores up to size different value.
Definition PixelpartAnimatedPropertyFloat3.cpp:98
void remove_keyframe(int index)
Remove the keyframe with the given index from the animation.
Definition PixelpartAnimatedPropertyFloat3.cpp:29
int keyframe_interpolation
Interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.h:27
void enable_adaptive_cache()
Enable an adaptive cache, which resizes itself automatically if the number of keyframes increases or ...
Definition PixelpartAnimatedPropertyFloat3.cpp:93
void set_keyframe_interpolation(int method)
Set interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.cpp:80
int get_keyframe_interpolation() const
Return interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat3.cpp:85
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