|
motion.h00001 /* 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 csVector3; 00027 class csQuaternion; 00028 class csTransform; 00029 00030 SCF_VERSION (iMotionTemplate, 0, 10, 0); 00031 00037 struct iMotionTemplate : public iBase 00038 { 00040 virtual const char* GetName () = 0; 00042 virtual void SetDuration (float duration) = 0; 00048 virtual void SetLoopCount (int looping) = 0; 00053 virtual void SetLoopFlip (bool enable) = 0; 00058 virtual int AddBone (const char* name) = 0; 00060 virtual int FindBoneByName (const char* name) = 0; 00062 virtual void AddFrameBone (int boneid, float frametime, 00063 const csVector3 &position, const csQuaternion &rotation) = 0; 00064 }; 00065 00066 SCF_VERSION (iMotionController, 0, 10, 0); 00067 00073 struct iMotionController : public iBase 00074 { 00076 virtual iSkeletonBone* GetSkeleton() = 0; 00078 virtual void SetMotion(iMotionTemplate *motion) = 0; 00080 virtual void BlendMotion(iMotionTemplate *motion) = 0; 00082 virtual void Pause(bool enable) = 0; 00083 00084 // All sorts of various features such as loop on/off, 00085 // per character timescaling, etc. 00086 }; 00087 00088 SCF_VERSION (iMotionManager, 0, 10, 0); 00089 00095 struct iMotionManager : public iBase 00096 { 00098 virtual iMotionTemplate* AddMotion (const char* name) = 0; 00100 virtual void DeleteMotion (iMotionTemplate* motiontemp) = 0; 00102 virtual iMotionTemplate* FindMotionByName (const char* name) = 0; 00103 00109 virtual iMotionController* AddController (iSkeletonBone *skel) = 0; 00115 virtual void DeleteController (iMotionController *inst) = 0; 00117 virtual iMotionController* FindControllerBySkeleton (iSkeletonBone *skel) = 0; 00118 00123 virtual void UpdateAll ( float timedelta ) = 0; 00128 virtual void UpdateAll ( unsigned int curtime ) = 0; 00134 virtual void UpdateAll () = 0; 00135 }; 00136 00137 #endif 00138 Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |