Main Page   Class Hierarchy   Compound List   File List   Compound Members  

motion.h

00001 /*
00002     Copyright (C) 2000 by Jorrit Tyberghein
00003   
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008   
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013   
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __IENGINE_MOTION_H__
00020 #define __IENGINE_MOTION_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "iengine/skelbone.h"
00024 
00025 class csMatrix3;
00026 class csQuaternion;
00027 class csVector3;
00028 
00029 SCF_VERSION (iMotion, 0, 9, 1);
00030 
00034 struct iMotion : public iBase
00035 {
00036   virtual const char* GetName () = 0;
00037   virtual void SetName (const char* name) = 0;
00038   virtual bool AddAnim (const csQuaternion &quat) = 0;
00039   virtual bool AddAnim (const csMatrix3 &mat) = 0;
00040   virtual bool AddAnim (const csVector3 &vec) = 0;
00041   virtual void AddFrameSet( const char *name ) = 0;
00042   virtual int AddFrame (int framenumber) = 0;
00043   virtual void AddFrameQLink ( int frameindex, const char* affector, int link) = 0;
00044   virtual void AddFrameMLink ( int frameindex, const char* affector, int link) = 0;
00045   virtual void AddFrameVLink ( int frameindex, const char* affector, int link) = 0;
00046 };
00047 
00048 SCF_VERSION (iMotionManager, 0, 9, 3);
00049 
00053 struct iMotionManager : public iBase
00054 {
00055   virtual iMotion* FindByName (const char* name) = 0;
00056   virtual iMotion* AddMotion (const char* name) = 0;
00057   virtual void DeleteMotion (const char* name) = 0;
00058   virtual int ApplyMotion (iSkeletonBone *skel, const char* motion, 
00059         const char *frameset, bool loop, bool sweep, float rate, 
00060           int time, bool cache) = 0;
00061           
00068   virtual void RecompileMotion ( int idx, bool cache ) = 0;
00069   
00070   virtual int ReserveMotion( int idx ) = 0;
00071   virtual int RestoreMotion( int idx ) = 0;
00072   virtual void DeleteAppliedMotion ( int idx, bool cached ) = 0;
00073   virtual void SetActiveMotion ( int idx, bool loop, bool sweep, 
00074     float rate ) = 0;
00075   virtual void SetCachedMotion ( int idx, bool loop, bool sweep, 
00076     float rate, int time ) = 0;
00077   virtual void SetReverse ( int idx ) = 0;
00078   virtual void SetLoop ( int idx, bool loop ) = 0;
00079   virtual void SetSweep ( int idx, bool sweep ) = 0;
00080   virtual void SetRate ( int idx, float rate ) = 0;
00081   virtual void SetTime ( int idx, int time ) = 0;
00082   virtual bool GetLoop ( int idx ) = 0;
00083   virtual bool GetSweep ( int idx ) = 0;
00084   virtual float GetRate ( int idx ) = 0;
00085   virtual int GetTime ( int idx ) = 0;
00086   virtual bool IsFirst ( int idx ) = 0;
00087   virtual bool IsLast ( int idx ) = 0;
00088   virtual void UpdateAll () = 0;
00089   virtual void UpdateAll ( int time ) = 0;
00090   virtual void SetSlerp ( bool setting ) = 0;
00091 };
00092 
00093 #endif

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000