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 00058 // This enum is also defined in the 'physics2' ragdoll node 00059 #ifndef __CS_IMESH_ANIMNODE_RAGDOLL_STATES_H__ 00060 #define __CS_IMESH_ANIMNODE_RAGDOLL_STATES_H__ 00061 00065 enum RagdollState 00066 { 00067 STATE_INACTIVE = 0, 00068 STATE_DYNAMIC, 00070 STATE_KINEMATIC 00073 }; 00074 00075 #endif 00076 00080 struct iSkeletonRagdollNodeFactory : public virtual iSkeletonAnimNodeFactory 00081 { 00082 SCF_INTERFACE(CS::Animation::iSkeletonRagdollNodeFactory, 2, 0, 1); 00083 00087 virtual void SetBodySkeleton (CS::Animation::iBodySkeleton* skeleton) = 0; 00088 00092 virtual CS::Animation::iBodySkeleton* GetBodySkeleton () const = 0; 00093 00099 virtual void AddBodyChain (iBodyChain* chain, RagdollState state = STATE_INACTIVE) = 0; 00100 00104 virtual void RemoveBodyChain (iBodyChain* chain) = 0; 00105 00118 virtual void SetChildNode (iSkeletonAnimNodeFactory* node) = 0; 00119 00123 virtual iSkeletonAnimNodeFactory* GetChildNode () const = 0; 00124 00129 virtual void SetDynamicSystem (iDynamicSystem* system) = 0; 00130 00135 virtual iDynamicSystem* GetDynamicSystem () const = 0; 00136 }; 00137 00143 struct iSkeletonRagdollNode : public virtual iSkeletonAnimNode 00144 { 00145 SCF_INTERFACE(CS::Animation::iSkeletonRagdollNode, 2, 0, 0); 00146 00152 virtual void SetDynamicSystem (iDynamicSystem* system) = 0; 00153 00157 virtual iDynamicSystem* GetDynamicSystem () const = 0; 00158 00162 virtual void SetBodyChainState (iBodyChain* chain, RagdollState state) = 0; 00163 00167 virtual RagdollState GetBodyChainState (iBodyChain* chain) const = 0; 00168 00172 virtual iRigidBody* GetBoneRigidBody (BoneID bone) = 0; 00173 00177 virtual iJoint* GetBoneJoint (const BoneID bone) = 0; 00178 00182 virtual uint GetBoneCount (RagdollState state) const = 0; 00183 00187 virtual BoneID GetBone (RagdollState state, uint index) const = 0; 00188 00199 virtual void ResetChainTransform (iBodyChain* chain) = 0; 00200 00206 virtual BoneID GetRigidBodyBone (iRigidBody* body) const = 0; 00207 }; 00208 00209 } // namespace Animation 00210 } // namespace CS 00211 00214 #endif //__CS_IMESH_ANIMNODE_RAGDOLL_H__
Generated for Crystal Space 2.1 by doxygen 1.6.1
