iengine/motion.h
Go to the documentation of this file.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 __CS_IENGINE_MOTION_H__ 00020 #define __CS_IENGINE_MOTION_H__ 00021 00028 #include "csutil/scf.h" 00029 #include "iengine/skelbone.h" 00030 00031 class csMatrix3; 00032 class csVector3; 00033 class csQuaternion; 00034 class csTransform; 00035 00036 SCF_VERSION (iMotionTemplate, 0, 10, 0); 00037 00043 struct iMotionTemplate : public iBase 00044 { 00046 virtual const char* GetName () = 0; 00048 virtual const float GetDuration() = 0; 00050 virtual const int GetLoopCount() = 0; 00052 virtual const bool GetLoopFlip() = 0; 00054 virtual void SetDuration (float duration) = 0; 00060 virtual void SetLoopCount (int looping) = 0; 00065 virtual void SetLoopFlip (bool enable) = 0; 00070 virtual int AddBone (const char* name) = 0; 00072 virtual int FindBoneByName (const char* name) = 0; 00074 virtual void AddFrameBone (int boneid, float frametime, 00075 const csVector3 &position, const csQuaternion &rotation) = 0; 00076 }; 00077 00078 SCF_VERSION (iMotionController, 0, 10, 0); 00079 00085 struct iMotionController : public iBase 00086 { 00088 virtual iSkeletonBone* GetSkeleton() const = 0; 00090 virtual void SetMotion(iMotionTemplate *motion) = 0; 00092 virtual void BlendMotion(iMotionTemplate *motion) = 0; 00094 virtual void Pause(bool enable) = 0; 00095 00096 // All sorts of various features such as loop on/off, 00097 // per character timescaling, etc. 00098 }; 00099 00100 SCF_VERSION (iMotionManager, 0, 10, 0); 00101 00107 struct iMotionManager : public iBase 00108 { 00110 virtual iMotionTemplate* AddMotion (const char* name) = 0; 00112 virtual void DeleteMotion (iMotionTemplate* motiontemp) = 0; 00114 virtual iMotionTemplate* FindMotionByName (const char* name) = 0; 00115 00121 virtual iMotionController* AddController (iSkeletonBone *skel) = 0; 00127 virtual void DeleteController (iMotionController *inst) = 0; 00129 virtual iMotionController* FindControllerBySkeleton (iSkeletonBone *skel) = 0; 00130 00135 virtual void UpdateAll ( float timedelta ) = 0; 00140 virtual void UpdateAll ( unsigned int curtime ) = 0; 00146 virtual void UpdateAll () = 0; 00147 }; 00148 00151 #endif // __CS_IENGINE_MOTION_H__ 00152
Generated for Crystal Space by doxygen 1.2.18