27#include "b2_block_allocator.h" 
   28#include "b2_contact_manager.h" 
   30#include "b2_stack_allocator.h" 
   31#include "b2_time_step.h" 
   32#include "b2_world_callbacks.h" 
  100                int32 velocityIterations,
 
  101                int32 positionIterations);
 
  133    const b2Body* GetBodyList() 
const;
 
  139    const b2Joint* GetJointList() 
const;
 
  151    bool GetAllowSleeping()
 const { 
return m_allowSleep; }
 
  155    bool GetWarmStarting()
 const { 
return m_warmStarting; }
 
  159    bool GetContinuousPhysics()
 const { 
return m_continuousPhysics; }
 
  163    bool GetSubStepping()
 const { 
return m_subStepping; }
 
  169    int32 GetBodyCount() 
const;
 
  172    int32 GetJointCount() 
const;
 
  175    int32 GetContactCount() 
const;
 
  188    void SetGravity(
const b2Vec2& gravity);
 
  191    b2Vec2 GetGravity() 
const;
 
  194    bool IsLocked() 
const;
 
  197    void SetAutoClearForces(
bool flag);
 
  200    bool GetAutoClearForces() 
const;
 
  222    friend class b2Controller;
 
  256    bool m_continuousPhysics;
 
 
  286    return m_contactManager.m_contactList;
 
 
  291    return m_contactManager.m_contactList;
 
  306    return m_contactManager.m_contactCount;
 
 
  326    m_clearForces = flag;
 
 
  332    return m_clearForces;
 
 
  337    return m_contactManager;
 
 
Definition b2_block_allocator.h:38
A rigid body. These are created via b2World::CreateBody.
Definition b2_body.h:129
Definition b2_world_callbacks.h:42
Definition b2_fixture.h:117
Definition b2_joint.h:111
Definition b2_world_callbacks.h:129
Definition b2_world_callbacks.h:141
Definition b2_stack_allocator.h:43
int32 GetProxyCount() const
Get the number of broad-phase proxies.
b2Body * GetBodyList()
Definition b2_world.h:264
b2Body * CreateBody(const b2BodyDef *def)
const b2ContactManager & GetContactManager() const
Get the contact manager for testing.
Definition b2_world.h:335
int32 GetBodyCount() const
Get the number of bodies.
Definition b2_world.h:294
~b2World()
Destruct the world. All physics entities are destroyed and all heap memory is released.
void SetContinuousPhysics(bool flag)
Enable/disable continuous physics. For testing.
Definition b2_world.h:158
b2Joint * GetJointList()
Definition b2_world.h:274
b2Joint * CreateJoint(const b2JointDef *def)
void SetContactListener(b2ContactListener *listener)
void SetAllowSleeping(bool flag)
Enable/disable sleep.
void SetDebugDraw(b2Draw *debugDraw)
bool IsLocked() const
Is the world locked (in the middle of a time step).
Definition b2_world.h:319
void Step(float timeStep, int32 velocityIterations, int32 positionIterations)
void SetContactFilter(b2ContactFilter *filter)
float GetTreeQuality() const
void SetWarmStarting(bool flag)
Enable/disable warm starting. For testing.
Definition b2_world.h:154
int32 GetJointCount() const
Get the number of joints.
Definition b2_world.h:299
void SetAutoClearForces(bool flag)
Set flag to control automatic clearing of forces after each time step.
Definition b2_world.h:324
int32 GetContactCount() const
Get the number of contacts (each may have 0 or more contact points).
Definition b2_world.h:304
void DebugDraw()
Call this to draw shapes and other debug draw data. This is intentionally non-const.
void RayCast(b2RayCastCallback *callback, const b2Vec2 &point1, const b2Vec2 &point2) const
int32 GetTreeBalance() const
Get the balance of the dynamic tree.
b2Contact * GetContactList()
Definition b2_world.h:284
int32 GetTreeHeight() const
Get the height of the dynamic tree.
b2Vec2 GetGravity() const
Get the global gravity vector.
Definition b2_world.h:314
void QueryAABB(b2QueryCallback *callback, const b2AABB &aabb) const
void DestroyBody(b2Body *body)
void DestroyJoint(b2Joint *joint)
bool GetAutoClearForces() const
Get the flag that controls automatic clearing of forces after each time step.
Definition b2_world.h:330
void SetDestructionListener(b2DestructionListener *listener)
void SetSubStepping(bool flag)
Enable/disable single stepped continuous physics. For testing.
Definition b2_world.h:162
void SetGravity(const b2Vec2 &gravity)
Change the global gravity vector.
Definition b2_world.h:309
const b2Profile & GetProfile() const
Get the current profile.
Definition b2_world.h:340
b2World(const b2Vec2 &gravity)
void ShiftOrigin(const b2Vec2 &newOrigin)
An axis aligned bounding box.
Definition b2_collision.h:169
Color for debug drawing. Each value has the range [0,1].
Definition b2_draw.h:31
Joint definitions are used to construct joints.
Definition b2_joint.h:73
Profiling data. Times are in milliseconds.
Definition b2_time_step.h:30
This is an internal structure.
Definition b2_time_step.h:43
A 2D column vector.
Definition b2_math.h:42