summaryrefslogtreecommitdiff
path: root/scene/animation/animation_player.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-03-09 00:14:08 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-03-09 00:14:08 +0100
commite46e43d2aaa6339a1675eb989f41885e745bf5c3 (patch)
treecf91f2869ff8f058c6682569fb31e22e5ee736ad /scene/animation/animation_player.h
parent1dad6eca812e5c2e313b54265114de8a1d73d999 (diff)
parent4a4f2479146aa33e235ed57cde311efda68d3c8f (diff)
Merge pull request #3928 from Marqin/whitespace
remove trailing whitespace - sorry for the broken PRs, please rebase :)
Diffstat (limited to 'scene/animation/animation_player.h')
-rw-r--r--scene/animation/animation_player.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 853526c80a..2ae3a0756c 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -53,7 +53,7 @@ public:
private:
enum {
-
+
NODE_CACHE_UPDATE_MAX=1024,
BLEND_FROM_MAX=3
};
@@ -96,23 +96,23 @@ private:
Map<StringName,PropertyAnim> property_anim;
-
+
TrackNodeCache() { skeleton=NULL; spatial=NULL; node=NULL; accum_pass=0; bone_idx=-1; node_2d=NULL; }
-
+
};
struct TrackNodeCacheKey {
-
+
uint32_t id;
int bone_idx;
inline bool operator<(const TrackNodeCacheKey& p_right) const {
-
+
if (id<p_right.id)
return true;
else if (id>p_right.id)
return false;
- else
+ else
return bone_idx<p_right.bone_idx;
}
};
@@ -135,7 +135,7 @@ private:
StringName next;
Vector<TrackNodeCache*> node_cache;
Ref<Animation> animation;
-
+
};
Map<StringName, AnimationData> animation_set;
@@ -148,41 +148,41 @@ private:
Map<BlendKey, float > blend_times;
-
-
+
+
struct PlaybackData {
-
+
AnimationData* from;
float pos;
float speed_scale;
PlaybackData() {
-
+
pos=0;
speed_scale=1.0;
- from=NULL;
+ from=NULL;
}
};
-
+
struct Blend {
-
+
PlaybackData data;
-
+
float blend_time;
float blend_left;
-
+
Blend() {
-
+
blend_left=0;
blend_time=0;
}
};
-
+
struct Playback {
-
- List<Blend> blend;
+
+ List<Blend> blend;
PlaybackData current;
StringName assigned;
} playback;
@@ -197,25 +197,25 @@ private:
bool active;
NodePath root;
-
+
void _animation_process_animation(AnimationData* p_anim,float p_time, float p_delta,float p_interp, bool p_allow_discrete=true);
-
- void _generate_node_caches(AnimationData* p_anim);
+
+ void _generate_node_caches(AnimationData* p_anim);
void _animation_process_data(PlaybackData &cd,float p_delta,float p_blend);
void _animation_process2(float p_delta);
void _animation_update_transforms();
void _animation_process(float p_delta);
-
+
void _node_removed(Node *p_node);
-
+
// bind helpers
DVector<String> _get_animation_list() const {
-
+
List<StringName> animations;
get_animation_list(&animations);
DVector<String> ret;
while(animations.size()) {
-
+
ret.push_back( animations.front()->get());
animations.pop_front();
}
@@ -236,9 +236,9 @@ protected:
bool _get(const StringName& p_name,Variant &r_ret) const;
void _get_property_list( List<PropertyInfo> *p_list) const;
void _notification(int p_what);
-
- static void _bind_methods();
-
+
+ static void _bind_methods();
+
public:
StringName find_animation(const Ref<Animation>& p_animation) const;
@@ -249,7 +249,7 @@ public:
bool has_animation(const StringName& p_name) const;
Ref<Animation> get_animation(const StringName& p_name) const;
void get_animation_list( List<StringName> * p_animations) const;
-
+
void set_blend_time(const StringName& p_animation1, const StringName& p_animation2, float p_time);
float get_blend_time( const StringName& p_animation1, const StringName& p_animation2) const;
@@ -258,7 +258,7 @@ public:
void set_default_blend_time(float p_default);
float get_default_blend_time() const;
-
+
void play(const StringName& p_name=StringName(),float p_custom_blend=-1,float p_custom_scale=1.0,bool p_from_end=false);
void play_backwards(const StringName& p_name=StringName(),float p_custom_blend=-1);
void queue(const StringName& p_name);
@@ -271,7 +271,7 @@ public:
void set_active(bool p_active);
bool is_active() const;
bool is_valid() const;
-
+
void set_speed(float p_speed);
float get_speed() const;
@@ -295,8 +295,8 @@ public:
void get_argument_options(const StringName& p_function,int p_idx,List<String>*r_options) const;
-
- AnimationPlayer();
+
+ AnimationPlayer();
~AnimationPlayer();
};