- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

animation.h

00001 //****************************************************************************//
00002 // animation.h                                                                //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_ANIMATION_H
00012 #define CAL_ANIMATION_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 #include "cal3d/global.h"
00019 
00020 //****************************************************************************//
00021 // Forward declarations                                                       //
00022 //****************************************************************************//
00023 
00024 class CalCoreAnimation;
00025 
00026 //****************************************************************************//
00027 // Class declaration                                                          //
00028 //****************************************************************************//
00029 
00030  /*****************************************************************************/
00034 class CAL3D_API CalAnimation
00035 {
00036 // misc
00037 public:
00038   enum Type
00039   {
00040     TYPE_NONE = 0,
00041     TYPE_CYCLE,
00042     TYPE_POSE,
00043     TYPE_ACTION
00044   };
00045 
00046   enum State
00047   {
00048     STATE_NONE = 0,
00049     STATE_SYNC,
00050     STATE_ASYNC,
00051     STATE_IN,
00052     STATE_STEADY,
00053     STATE_OUT,
00054     STATE_STOPPED
00055   };
00056 
00057 // member variables
00058 protected:
00059   CalCoreAnimation *m_pCoreAnimation;
00060   Type m_type;
00061   State m_state;
00062   float m_time;
00063   float m_timeFactor;
00064   float m_weight;
00065 
00066 // constructors/destructor
00067 protected:
00068   CalAnimation();
00069 public:
00070   virtual ~CalAnimation();
00071 
00072 // member functions 
00073 public:
00074   virtual bool create(CalCoreAnimation *pCoreAnimation) = 0;
00075   virtual void destroy();
00076   CalCoreAnimation *getCoreAnimation();
00077   State getState();
00078   float getTime();
00079   Type getType();
00080   float getWeight();
00081   void setTime(float time);
00082   void setTimeFactor(float timeFactor);
00083   float getTimeFactor();
00084 
00085 };
00086 
00087 #endif
00088 
00089 //****************************************************************************//

Generated at Fri Nov 19 03:49:19 2004 by The Cal3D Team with doxygen 1.3.9.1 © 1997-2001 Dimitri van Heesch