summaryrefslogtreecommitdiff
path: root/scene/animation/animation_blend_space_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_blend_space_2d.h')
-rw-r--r--scene/animation/animation_blend_space_2d.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/scene/animation/animation_blend_space_2d.h b/scene/animation/animation_blend_space_2d.h
index 2aff678aad..a919fff1d2 100644
--- a/scene/animation/animation_blend_space_2d.h
+++ b/scene/animation/animation_blend_space_2d.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,23 +55,23 @@ protected:
};
BlendPoint blend_points[MAX_BLEND_POINTS];
- int blend_points_used;
+ int blend_points_used = 0;
struct BlendTriangle {
- int points[3];
+ int points[3] = {};
};
Vector<BlendTriangle> triangles;
- StringName blend_position;
- StringName closest;
- StringName length_internal;
- Vector2 max_space;
- Vector2 min_space;
- Vector2 snap;
- String x_label;
- String y_label;
- BlendMode blend_mode;
+ StringName blend_position = "blend_position";
+ StringName closest = "closest";
+ StringName length_internal = "length_internal";
+ Vector2 max_space = Vector2(1, 1);
+ Vector2 min_space = Vector2(-1, -1);
+ Vector2 snap = Vector2(0.1, 0.1);
+ String x_label = "x";
+ String y_label = "y";
+ BlendMode blend_mode = BLEND_MODE_INTERPOLATED;
void _add_blend_point(int p_index, const Ref<AnimationRootNode> &p_node);
void _set_triangles(const Vector<int> &p_triangles);
@@ -79,8 +79,8 @@ protected:
void _blend_triangle(const Vector2 &p_pos, const Vector2 *p_points, float *r_weights);
- bool auto_triangles;
- bool trianges_dirty;
+ bool auto_triangles = true;
+ bool trianges_dirty = false;
void _update_triangles();
void _queue_auto_triangles();
@@ -126,7 +126,7 @@ public:
void set_y_label(const String &p_label);
String get_y_label() const;
- virtual float process(float p_time, bool p_seek) override;
+ virtual double process(double p_time, bool p_seek) override;
virtual String get_caption() const override;
Vector2 get_closest_point(const Vector2 &p_point);