CrystalSpace

Public API Reference

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

gmeshskel.h

00001 /*
00002     Copyright  (C) 2004 by Hristo Hristov
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_IMESH_GMESHSKEL_H__
00020 #define __CS_IMESH_GMESHSKEL_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csgeom/transfrm.h"
00024 #include "csgeom/box.h"
00025 
00026 struct iRigidBody;
00027 struct iGenMeshSkeletonBone;
00028 struct iGenMeshSkeletonScript;
00029 
00030 enum BoneTransformMode
00031 {
00032         BM_SCRIPT = 0,
00033         BM_PHYSICS,
00034         BM_NONE
00035 };
00036 
00037 SCF_VERSION  (iGenMeshSkeletonControlState, 0, 0, 1);
00038 
00045 struct iGenMeshSkeletonControlState : public iBase
00046 {
00050   virtual int GetBonesCount () = 0;
00051 
00055   virtual iGenMeshSkeletonBone *GetBone (int i) = 0;
00056 
00060   virtual iGenMeshSkeletonBone *FindBone (const char *name) = 0;
00061 
00067   virtual iGenMeshSkeletonScript* Execute (const char *scriptname) = 0;
00068 
00072   virtual size_t GetScriptsCount () = 0;
00073 
00077   virtual iGenMeshSkeletonScript* GetScript (size_t i) = 0;
00078 
00082   virtual iGenMeshSkeletonScript* FindScript (const char *scriptname) = 0;
00083 
00087   virtual void StopAll () = 0;
00088 
00092   virtual void Stop (const char* scriptname) = 0;
00093 
00097   virtual void Stop (iGenMeshSkeletonScript *script) = 0;
00098 
00104   virtual void SetAlwaysUpdate(bool always_update) = 0;
00105 
00109   virtual bool GetAlwaysUpdate() = 0;
00110 };
00111 
00112 SCF_VERSION  (iGenMeshSkeletonBone, 0, 0, 1);
00113 
00114 struct iGenMeshSkeletonBone : public iBase
00115 {
00119   virtual const char *GetName () const = 0;
00120 
00124   virtual void SetName (const char *name) = 0;
00125 
00129   virtual csReversibleTransform &GetTransform () = 0;
00130 
00134   virtual csReversibleTransform &GetFullTransform () = 0;
00135 
00139   virtual iGenMeshSkeletonBone *GetParent () = 0;
00140 
00145   virtual void GetSkinBox (csBox3 &box, csVector3 &center) = 0;
00146 
00154   virtual void SetMode (BoneTransformMode mode) = 0;
00155 
00159   virtual BoneTransformMode GetMode () = 0;
00160 
00164   virtual void SetRigidBody (iRigidBody *r_body) = 0;
00165 
00169   virtual iRigidBody *GetRigidBody () = 0;
00170 
00174   virtual int GetChildrenCount () = 0;
00175 
00179   virtual iGenMeshSkeletonBone *GetChild (int i) = 0;
00180 
00184   virtual iGenMeshSkeletonBone *FindChild (const char *name) = 0;
00185 };
00186 
00187 SCF_VERSION  (iGenMeshSkeletonScript, 0, 0, 1);
00188 
00189 struct iGenMeshSkeletonScript : public iBase
00190 {
00194   virtual const char *GetName () = 0;
00195 
00199   virtual size_t GetTime () = 0;
00200 
00204   virtual void SetTime (size_t time) = 0;
00205 
00240   virtual void SetFactor (float factor) = 0;
00241 
00245   virtual float GetFactor () = 0;
00246 };
00247 
00248 #endif // __CS_IMESH_GMESHSKEL_H__

Generated for Crystal Space by doxygen 1.3.9.1