00001 /********************* 00002 * Untitledurpose 00003 * uthor 00004 **********************/ 00005 #pragma once 00006 00007 #include "constants.h" 00008 #include "types.h" 00009 #include "GModel.h" 00010 #include "GSkeleton.h" 00011 00012 class GModel; 00013 class GSkeleton; 00014 00015 enum AnimationState 00016 { 00017 Playing, 00018 Done 00019 }; 00020 00021 class GAnimationManager 00022 { 00023 public: 00024 animation_t *animation; 00025 animationlibrary_t *animationlibrary; 00026 keyframelibrary_t *keyframelibrary; 00027 double starttime; 00028 double dt; 00029 int currentedge; 00030 00031 AnimationState State; 00032 int GetIndexForAnimation(char *AnimationName); 00033 int UpdateAnimation(GModel *model, double time, double dtime, int FLAGS = 0); 00034 int UpdateModel(GModel *Model, keyframe_t oldstate, keyframe_t newstate, float dt); 00035 int Reset(void); 00036 GAnimationManager(); 00037 int SkipAnimation(void); 00038 };