- Cal3D 0.11 API Reference -

mixer.h

00001 //****************************************************************************//
00002 // mixer.h                                                                    //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 // Copyright (C) 2004 Mekensleep <licensing@mekensleep.com>                   //
00005 //****************************************************************************//
00006 // This library is free software; you can redistribute it and/or modify it    //
00007 // under the terms of the GNU Lesser General Public License as published by   //
00008 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00009 // your option) any later version.                                            //
00010 //****************************************************************************//
00011 
00012 #ifndef CAL_MIXER_H
00013 #define CAL_MIXER_H
00014 
00015 //****************************************************************************//
00016 // Includes                                                                   //
00017 //****************************************************************************//
00018 
00019 #include "cal3d/global.h"
00020 
00021 //****************************************************************************//
00022 // Forward declarations                                                       //
00023 //****************************************************************************//
00024 
00025 class CalModel;
00026 class CalAnimation;
00027 class CalAnimationAction;
00028 class CalAnimationCycle;
00029 
00030 
00031 
00032 
00033 /*****************************************************************************/
00097 class CAL3D_API CalAbstractMixer
00098 {
00099 public:
00100   CalAbstractMixer() {}
00101   virtual ~CalAbstractMixer() {}
00102 
00103   /*****************************************************************************/
00111   virtual bool isDefaultMixer() { return false; }
00112 
00113   /*****************************************************************************/
00130   virtual void updateAnimation(float deltaTime) = 0;
00131 
00132   /*****************************************************************************/
00148   virtual void updateSkeleton() = 0;
00149 };
00150 
00151 
00152 class CAL3D_API CalMixer : public CalAbstractMixer
00153 {
00154 public:
00155   CalMixer(CalModel* pModel);
00156   virtual ~CalMixer();
00157 
00158   virtual bool isDefaultMixer() { return true; }
00159   bool blendCycle(int id, float weight, float delay);
00160   bool clearCycle(int id, float delay);
00161   bool executeAction(int id, float delayIn, float delayOut, float weightTarget = 1.0f, bool autoLock=false);
00162   bool removeAction(int id);
00163   virtual void updateAnimation(float deltaTime);
00164   virtual void updateSkeleton();
00165   float getAnimationTime();
00166   float getAnimationDuration();
00167   void setAnimationTime(float animationTime);
00168   void setTimeFactor(float timeFactor);
00169   float getTimeFactor();
00170   CalModel *getCalModel();  
00171   std::vector<CalAnimation *> &getAnimationVector();
00172   std::list<CalAnimationAction *> &getAnimationActionList();
00173   std::list<CalAnimationCycle *> &getAnimationCycle();  
00174   
00175 protected:
00176   CalModel *m_pModel;
00177   std::vector<CalAnimation *> m_vectorAnimation;
00178   std::list<CalAnimationAction *> m_listAnimationAction;
00179   std::list<CalAnimationCycle *> m_listAnimationCycle;
00180   float m_animationTime;
00181   float m_animationDuration;
00182   float m_timeFactor;
00183 };
00184 
00185 #endif
00186 
00187 //****************************************************************************//

Generated at Thu Jun 29 19:03:59 2006 by The Cal3D Team with Doxygen 1.4.6