/*************************************************************************** This source file is part of OGREBULLET (Object-oriented Graphics Rendering Engine Bullet Wrapper) For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 Copyright (c) 2007 tuan.kuranes@gmail.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt. ----------------------------------------------------------------------------- */ #ifndef _OGREBULLETCOLLISIONS_RagDoll_H #define _OGREBULLETCOLLISIONS_RagDoll_H #include "OgreBulletDynamicsPreRequisites.h" namespace OgreBulletDynamics { // ------------------------------------------------------------------------- // basic CollisionWorld class RagDoll { public: RagDoll (btDynamicsWorld* ownerWorld, const btVector3& positionOffset); virtual ~RagDoll (); // Make ragdoll active. void ragdollEnable(bool doEnable); // is ragdoll active. bool isRagdollEnabled(); // Make constraint between body part active. void constraintEnable(bool value); // are constraint between body part active ? bool isConstraintEnabled(); // Make it collidable or not. void collisionEnable(bool value); // if shapes can collide bool isCollisionEnabled(); // Make it fixed in a pose or not. void rigidityEnable(bool value); // is it fixed on a pose? bool isRigidityEnable(); protected: btDynamicsWorld* m_ownerWorld; std::vector m_shapes; std::vector m_bodies; std::vector m_joints; btRigidBody* localCreateRigidBody (btScalar mass, const btTransform& startTransform, btCollisionShape* shape); }; } #endif //_OGREBULLETCOLLISIONS_CollisionWorld_H