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

animation.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                    animation.h  -  Template base for animations
00003                              -------------------
00004     begin                : Fri Nov 23 2001
00005     copyright            : (C) 2001 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, animation.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2001
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NEANIMATION_H
00028 #define __NEANIMATION_H
00029 
00030 
00031 #include "base.h"
00032 #include "hashstring.h"
00033 #include "updateentity.h"
00034 
00035 #include <vector>
00036 
00037 #include <assert.h>
00038 
00039 
00046 namespace NeoEngine
00047 {
00048 
00049 
00054 template < class KeyframeType > class Animation : public virtual UpdateEntity
00055 {
00056     public:
00057 
00058         typedef std::vector< KeyframeType* >          KeyframeVec;
00059 
00061         KeyframeVec                                   m_vpkKeyframes;
00062 
00064         unsigned int                                  m_uiID;
00065 
00067         HashString                                    m_strName;
00068 
00070         float                                         m_fLength;
00071 
00073         float                                         m_fCurTime;
00074 
00076         int                                           m_iLastKeyframe;
00077 
00079         int                                           m_iNextKeyframe;
00080 
00082         float                                         m_fOffset;
00083 
00084 
00088                                                       Animation();
00089 
00094                                                       Animation( const Animation< KeyframeType > &rkAnimation );
00095 
00099         virtual                                      ~Animation();
00100 
00105         inline virtual void                           AddKeyframe( KeyframeType *pkKeyframe );
00106 
00111         inline virtual void                           Update( float fDeltaTime );
00112 };
00113 
00114 
00115 #include "animation_inl.h"
00116 
00117 
00118 };
00119 
00120 
00121 #endif

Generated on Wed Jan 21 14:21:06 2004 for NeoEngine by doxygen 1.3.5