00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_ANIMATION_ACTION_H
00012 #define CAL_ANIMATION_ACTION_H
00013
00014
00015 #include "cal3d/global.h"
00016 #include "cal3d/animation.h"
00017
00018
00019 class CalCoreAnimation;
00020
00021
00022 class CAL3D_API CalAnimationAction : public CalAnimation
00023 {
00024 public:
00025 CalAnimationAction(CalCoreAnimation *pCoreAnimation);
00026 virtual ~CalAnimationAction() { }
00027
00028 bool execute(float delayIn, float delayOut, float weightTarget = 1.0f, bool autoLock=false);
00029 bool update(float deltaTime);
00030
00031 private:
00032 float m_delayIn;
00033 float m_delayOut;
00034 float m_delayTarget;
00035 float m_weightTarget;
00036 bool m_autoLock;
00037 float m_scale;
00038 float m_rampValue;
00039 CompositionFunction m_compositionFunction;
00040 enum SequencingMode {
00041 SequencingModeNull = 0,
00042 SequencingModeAutomatic,
00043 SequencingModeManual
00044 } m_sequencingMode;
00045 bool m_manualOn;
00046 public:
00047 bool setManual();
00048 bool setManualAnimationActionOn( bool p );
00049 bool setManualAnimationActionWeight( float );
00050 bool setScale( float );
00051 float getScale();
00052 bool setCompositionFunction( CompositionFunction );
00053 CompositionFunction getCompositionFunction();
00054 bool setRampValue( float );
00055 float getRampValue();
00056 bool manual();
00057 bool on();
00058 };
00059
00060 #endif