1#ifndef PIXELPART_ANIMATED_PROPERTY_FLOAT2_H
2#define PIXELPART_ANIMATED_PROPERTY_FLOAT2_H
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>
17class PixelpartAnimatedPropertyFloat2 :
public RefCounted {
18 GDCLASS(PixelpartAnimatedPropertyFloat2, RefCounted)
21 PixelpartAnimatedPropertyFloat2();
30 void init(pixelpart::AnimatedProperty<pixelpart::float2_t>* prop);
38 Vector2
at(
float position)
const;
136 static void _bind_methods();
139 pixelpart::AnimatedProperty<pixelpart::float2_t>*
property =
nullptr;
bool contains_keyframes() const
Return whether the animation property contains any keyframes.
Definition PixelpartAnimatedPropertyFloat2.cpp:49
void add_keyframe(float position, Vector2 value)
Add a keyframe at time position with value value.
Definition PixelpartAnimatedPropertyFloat2.cpp:23
void set_keyframe_value(int index, Vector2 value)
Change the value of the keyframe with the given index.
Definition PixelpartAnimatedPropertyFloat2.cpp:33
int get_keyframe_index(float position, float epsilon)
Return the index of the keyframe closest to time position.
Definition PixelpartAnimatedPropertyFloat2.cpp:71
int get_keyframe_count() const
Return the number of keyframes.
Definition PixelpartAnimatedPropertyFloat2.cpp:56
void set_keyframe_position(int index, float position)
Move the time of the keyframe with the given index to position.
Definition PixelpartAnimatedPropertyFloat2.cpp:38
int get_keyframe_interpolation() const
Return interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat2.cpp:84
int keyframe_interpolation
Interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat2.h:27
Vector2 get_keyframe_value(int index) const
Return the value of the keyframe with the given index.
Definition PixelpartAnimatedPropertyFloat2.cpp:63
void set_keyframe_interpolation(int method)
Set interpolation applied to the animation curve.
Definition PixelpartAnimatedPropertyFloat2.cpp:79
void clear_keyframes()
Remove all keyframes from the animation.
Definition PixelpartAnimatedPropertyFloat2.cpp:43
void enable_fixed_cache(int size)
Enable a fixed cache with the given size, which only stores up to size different value.
Definition PixelpartAnimatedPropertyFloat2.cpp:97
Vector2 at(float position) const
Return the (interpolated) value of the animation property at time position.
Definition PixelpartAnimatedPropertyFloat2.cpp:15
void enable_adaptive_cache()
Enable an adaptive cache, which resizes itself automatically if the number of keyframes increases or ...
Definition PixelpartAnimatedPropertyFloat2.cpp:92
void remove_keyframe(int index)
Remove the keyframe with the given index from the animation.
Definition PixelpartAnimatedPropertyFloat2.cpp:28