imesh/animnode/ragdoll.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2009-10 Christian Van Brussel, Institute of Information 00003 and Communication Technologies, Electronics and Applied Mathematics 00004 at Universite catholique de Louvain, Belgium 00005 http://www.uclouvain.be/en-icteam.html 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public 00018 License along with this library; if not, write to the Free 00019 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 */ 00021 #ifndef __CS_IMESH_ANIMNODE_RAGDOLL_H__ 00022 #define __CS_IMESH_ANIMNODE_RAGDOLL_H__ 00023 00028 #include "csutil/scf_interface.h" 00029 00030 #include "imesh/bodymesh.h" 00031 00035 namespace CS { 00036 namespace Mesh { 00037 00038 struct iAnimatedMesh; 00039 00040 } // namespace Mesh 00041 } // namespace CS 00042 00043 namespace CS { 00044 namespace Animation { 00045 00046 struct iSkeletonRagdollNodeFactory; 00047 00052 struct iSkeletonRagdollNodeManager 00053 : public virtual CS::Animation::iSkeletonAnimNodeManager<CS::Animation::iSkeletonRagdollNodeFactory> 00054 { 00055 SCF_ISKELETONANIMNODEMANAGER_INTERFACE (CS::Animation::iSkeletonRagdollNodeManager, 1, 0, 0); 00056 }; 00057 00061 enum RagdollState 00062 { 00063 STATE_INACTIVE = 0, 00064 STATE_DYNAMIC, 00066 STATE_KINEMATIC 00069 }; 00070 00074 struct iSkeletonRagdollNodeFactory : public virtual iSkeletonAnimNodeFactory 00075 { 00076 SCF_INTERFACE(CS::Animation::iSkeletonRagdollNodeFactory, 2, 0, 1); 00077 00081 virtual void SetBodySkeleton (CS::Animation::iBodySkeleton* skeleton) = 0; 00082 00086 virtual CS::Animation::iBodySkeleton* GetBodySkeleton () const = 0; 00087 00093 virtual void AddBodyChain (iBodyChain* chain, RagdollState state = STATE_INACTIVE) = 0; 00094 00098 virtual void RemoveBodyChain (iBodyChain* chain) = 0; 00099 00112 virtual void SetChildNode (iSkeletonAnimNodeFactory* node) = 0; 00113 00117 virtual iSkeletonAnimNodeFactory* GetChildNode () const = 0; 00118 00123 virtual void SetDynamicSystem (iDynamicSystem* system) = 0; 00124 00129 virtual iDynamicSystem* GetDynamicSystem () const = 0; 00130 }; 00131 00137 struct iSkeletonRagdollNode : public virtual iSkeletonAnimNode 00138 { 00139 SCF_INTERFACE(CS::Animation::iSkeletonRagdollNode, 2, 0, 0); 00140 00146 virtual void SetDynamicSystem (iDynamicSystem* system) = 0; 00147 00151 virtual iDynamicSystem* GetDynamicSystem () const = 0; 00152 00156 virtual void SetBodyChainState (iBodyChain* chain, RagdollState state) = 0; 00157 00161 virtual RagdollState GetBodyChainState (iBodyChain* chain) const = 0; 00162 00166 virtual iRigidBody* GetBoneRigidBody (BoneID bone) = 0; 00167 00171 virtual iJoint* GetBoneJoint (const BoneID bone) = 0; 00172 00176 virtual uint GetBoneCount (RagdollState state) const = 0; 00177 00181 virtual BoneID GetBone (RagdollState state, uint index) const = 0; 00182 00193 virtual void ResetChainTransform (iBodyChain* chain) = 0; 00194 00200 virtual BoneID GetRigidBodyBone (iRigidBody* body) const = 0; 00201 }; 00202 00203 } // namespace Animation 00204 } // namespace CS 00205 00208 #endif //__CS_IMESH_ANIMNODE_RAGDOLL_H__
Generated for Crystal Space 2.0 by doxygen 1.6.1