summaryrefslogtreecommitdiff
path: root/scene/animation/animation_tree.h
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-08-09 17:15:17 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-08-09 17:43:48 -0500
commit430ad75963a0e6837ef460e78fb99565714b4418 (patch)
treed5b98ae003fd64fb76a77def411c6a51d97c48ee /scene/animation/animation_tree.h
parentc68b109f270a2bf1c42c3f083b53e7bc26dadfd6 (diff)
Some work on double support
Diffstat (limited to 'scene/animation/animation_tree.h')
-rw-r--r--scene/animation/animation_tree.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index 19214c6a82..59bbc5b4da 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -57,7 +57,7 @@ public:
Vector<Input> inputs;
- float process_input(int p_input, float p_time, bool p_seek, float p_blend);
+ real_t process_input(int p_input, real_t p_time, bool p_seek, real_t p_blend);
friend class AnimationTree;
@@ -65,8 +65,8 @@ public:
Ref<Animation> animation;
double time = 0.0;
double delta = 0.0;
- const Vector<float> *track_blends = nullptr;
- float blend = 0.0;
+ const Vector<real_t> *track_blends = nullptr;
+ real_t blend = 0.0;
bool seeked = false;
};
@@ -81,10 +81,10 @@ public:
uint64_t last_pass = 0;
};
- Vector<float> blends;
+ Vector<real_t> blends;
State *state = nullptr;
- float _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, float p_time, bool p_seek, const Vector<StringName> &p_connections);
+ real_t _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, real_t p_time, bool p_seek, const Vector<StringName> &p_connections);
void _pre_update_animations(HashMap<NodePath, int> *track_map);
//all this is temporary
@@ -98,12 +98,12 @@ public:
Array _get_filters() const;
void _set_filters(const Array &p_filters);
friend class AnimationNodeBlendTree;
- float _blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, float p_time, bool p_seek, float p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true, float *r_max = nullptr);
+ real_t _blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, real_t p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true, real_t *r_max = nullptr);
protected:
- void blend_animation(const StringName &p_animation, float p_time, float p_delta, bool p_seeked, float p_blend);
- float blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, float p_time, bool p_seek, float p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true);
- float blend_input(int p_input, float p_time, bool p_seek, float p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true);
+ void blend_animation(const StringName &p_animation, real_t p_time, real_t p_delta, bool p_seeked, real_t p_blend);
+ real_t blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, real_t p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true);
+ real_t blend_input(int p_input, real_t p_time, bool p_seek, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true);
void make_invalid(const String &p_reason);
static void _bind_methods();
@@ -191,7 +191,7 @@ private:
int bone_idx = -1;
Vector3 loc;
Quaternion rot;
- float rot_blend_accum = 0.0;
+ real_t rot_blend_accum = 0.0;
Vector3 scale;
TrackCacheTransform() {
@@ -210,7 +210,7 @@ private:
};
struct TrackCacheBezier : public TrackCache {
- float value = 0.0;
+ real_t value = 0.0;
Vector<StringName> subpath;
TrackCacheBezier() {
type = Animation::TYPE_BEZIER;
@@ -219,8 +219,8 @@ private:
struct TrackCacheAudio : public TrackCache {
bool playing = false;
- float start = 0.0;
- float len = 0.0;
+ real_t start = 0.0;
+ real_t len = 0.0;
TrackCacheAudio() {
type = Animation::TYPE_AUDIO;
@@ -251,7 +251,7 @@ private:
void _clear_caches();
bool _update_caches(AnimationPlayer *player);
- void _process_graph(float p_delta);
+ void _process_graph(real_t p_delta);
uint64_t setup_pass = 1;
uint64_t process_pass = 1;
@@ -271,7 +271,7 @@ private:
struct Activity {
uint64_t last_pass = 0;
- float activity = 0.0;
+ real_t activity = 0.0;
};
HashMap<StringName, Vector<Activity>> input_activity_map;
@@ -312,8 +312,8 @@ public:
Transform3D get_root_motion_transform() const;
- float get_connection_activity(const StringName &p_path, int p_connection) const;
- void advance(float p_time);
+ real_t get_connection_activity(const StringName &p_path, int p_connection) const;
+ void advance(real_t p_time);
void rename_parameter(const String &p_base, const String &p_new_base);