- Cal3D 0.11 API Reference -

mixer.h
1 //****************************************************************************//
2 // mixer.h //
3 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4 // Copyright (C) 2004 Mekensleep <licensing@mekensleep.com> //
5 //****************************************************************************//
6 // This library is free software; you can redistribute it and/or modify it //
7 // under the terms of the GNU Lesser General Public License as published by //
8 // the Free Software Foundation; either version 2.1 of the License, or (at //
9 // your option) any later version. //
10 //****************************************************************************//
11 
12 #ifndef CAL_MIXER_H
13 #define CAL_MIXER_H
14 
15 //****************************************************************************//
16 // Includes //
17 //****************************************************************************//
18 
19 #include "cal3d/global.h"
20 
21 //****************************************************************************//
22 // Forward declarations //
23 //****************************************************************************//
24 
25 class CalModel;
26 class CalAnimation;
27 class CalAnimationAction;
28 class CalAnimationCycle;
29 
30 
31 
32 
33 /*****************************************************************************/
97 class CAL3D_API CalAbstractMixer
98 {
99 public:
100  CalAbstractMixer() {}
101  virtual ~CalAbstractMixer() {}
102 
103  /*****************************************************************************/
111  virtual bool isDefaultMixer() { return false; }
112 
113  /*****************************************************************************/
130  virtual void updateAnimation(float deltaTime) = 0;
131 
132  /*****************************************************************************/
148  virtual void updateSkeleton() = 0;
149 };
150 
151 
152 class CAL3D_API CalMixer : public CalAbstractMixer
153 {
154 public:
155  CalMixer(CalModel* pModel);
156  virtual ~CalMixer();
157 
158  virtual bool isDefaultMixer() { return true; }
159  bool blendCycle(int id, float weight, float delay);
160  bool clearCycle(int id, float delay);
161  bool executeAction(int id, float delayIn, float delayOut, float weightTarget = 1.0f, bool autoLock=false);
162  bool removeAction(int id);
163  virtual void updateAnimation(float deltaTime);
164  virtual void updateSkeleton();
165  float getAnimationTime();
166  float getAnimationDuration();
167  void setAnimationTime(float animationTime);
168  void setTimeFactor(float timeFactor);
169  float getTimeFactor();
170  CalModel *getCalModel();
171  std::vector<CalAnimation *> &getAnimationVector();
172  std::list<CalAnimationAction *> &getAnimationActionList();
173  std::list<CalAnimationCycle *> &getAnimationCycle();
174 
175 protected:
176  CalModel *m_pModel;
177  std::vector<CalAnimation *> m_vectorAnimation;
178  std::list<CalAnimationAction *> m_listAnimationAction;
179  std::list<CalAnimationCycle *> m_listAnimationCycle;
180  float m_animationTime;
181  float m_animationDuration;
182  float m_timeFactor;
183 };
184 
185 #endif
186 
187 //****************************************************************************//

Generated at Sat Aug 3 2013 04:35:53 by The Cal3D Team with Doxygen 1.8.4