Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/Presentation_HS16/src/external/bullet/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h

Last change on this file was 8393, checked in by rgrieder, 14 years ago

Updated Bullet from v2.77 to v2.78.
(I'm not going to make a branch for that since the update from 2.74 to 2.77 hasn't been tested that much either).

You will HAVE to do a complete RECOMPILE! I tested with MSVC and MinGW and they both threw linker errors at me.

  • Property svn:eol-style set to native
File size: 3.1 KB
Line 
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16#ifndef BT_SIMPLE_DYNAMICS_WORLD_H
17#define BT_SIMPLE_DYNAMICS_WORLD_H
18
19#include "btDynamicsWorld.h"
20
21class btDispatcher;
22class btOverlappingPairCache;
23class btConstraintSolver;
24
25///The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds.
26///Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished).
27class btSimpleDynamicsWorld : public btDynamicsWorld
28{
29protected:
30
31        btConstraintSolver*     m_constraintSolver;
32
33        bool    m_ownsConstraintSolver;
34
35        void    predictUnconstraintMotion(btScalar timeStep);
36       
37        void    integrateTransforms(btScalar timeStep);
38               
39        btVector3       m_gravity;
40       
41public:
42
43
44
45        ///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
46        btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration);
47
48        virtual ~btSimpleDynamicsWorld();
49               
50        ///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead
51        virtual int     stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
52
53        virtual void    setGravity(const btVector3& gravity);
54
55        virtual btVector3 getGravity () const;
56
57        virtual void    addRigidBody(btRigidBody* body);
58
59        virtual void    addRigidBody(btRigidBody* body, short group, short mask);
60
61        virtual void    removeRigidBody(btRigidBody* body);
62
63        virtual void    debugDrawWorld();
64                               
65        virtual void    addAction(btActionInterface* action);
66
67        virtual void    removeAction(btActionInterface* action);
68
69        ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject
70        virtual void    removeCollisionObject(btCollisionObject* collisionObject);
71       
72        virtual void    updateAabbs();
73
74        virtual void    synchronizeMotionStates();
75
76        virtual void    setConstraintSolver(btConstraintSolver* solver);
77
78        virtual btConstraintSolver* getConstraintSolver();
79
80        virtual btDynamicsWorldType     getWorldType() const
81        {
82                return BT_SIMPLE_DYNAMICS_WORLD;
83        }
84
85        virtual void    clearForces();
86
87};
88
89#endif //BT_SIMPLE_DYNAMICS_WORLD_H
Note: See TracBrowser for help on using the repository browser.