Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/physics/src/ogrebullet/Dynamics/Prefab/OgreBulletDynamicsRagDoll.h @ 2274

Last change on this file since 2274 was 2192, checked in by rgrieder, 16 years ago

Reverted all changes of attempt to update physics branch.

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/***************************************************************************
2
3This source file is part of OGREBULLET
4(Object-oriented Graphics Rendering Engine Bullet Wrapper)
5For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10
6
7Copyright (c) 2007 tuan.kuranes@gmail.com
8
9
10
11This program is free software; you can redistribute it and/or modify it under
12the terms of the GNU Lesser General Public License as published by the Free Software
13Foundation; either version 2 of the License, or (at your option) any later
14version.
15
16This program is distributed in the hope that it will be useful, but WITHOUT
17ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
19
20You should have received a copy of the GNU Lesser General Public License along with
21this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22Place - Suite 330, Boston, MA 02111-1307, USA, or go to
23http://www.gnu.org/copyleft/lesser.txt.
24-----------------------------------------------------------------------------
25*/
26
27
28#ifndef _OGREBULLETCOLLISIONS_RagDoll_H
29#define _OGREBULLETCOLLISIONS_RagDoll_H
30
31
32#include "OgreBulletDynamicsPreRequisites.h"
33
34
35namespace OgreBulletDynamics
36{
37        // -------------------------------------------------------------------------
38        // basic CollisionWorld
39        class RagDoll
40        {
41        public:
42                RagDoll (btDynamicsWorld* ownerWorld, 
43                                const btVector3& positionOffset);
44
45                virtual ~RagDoll ();
46
47                // Make ragdoll  active.
48                void ragdollEnable(bool doEnable);
49                // is ragdoll active.
50                bool isRagdollEnabled();
51
52                // Make constraint between body part active.
53                void constraintEnable(bool value);
54                // are constraint between body part active ?
55                bool isConstraintEnabled();
56
57                // Make it collidable or not.
58                void collisionEnable(bool value);
59                // if shapes can collide
60                bool isCollisionEnabled();
61
62                // Make it fixed in a pose or not.
63                void rigidityEnable(bool value);
64                // is it fixed on a pose?
65                bool isRigidityEnable();
66
67
68        protected:
69                btDynamicsWorld* m_ownerWorld;
70
71                std::vector<btCollisionShape* >  m_shapes;
72                std::vector<btRigidBody* >               m_bodies;
73                std::vector<btTypedConstraint* > m_joints;
74
75                btRigidBody* localCreateRigidBody (btScalar mass, 
76                        const btTransform& startTransform, 
77                        btCollisionShape* shape);
78
79        };
80}
81#endif //_OGREBULLETCOLLISIONS_CollisionWorld_H
82
Note: See TracBrowser for help on using the repository browser.