72 void SetDebugDraw(
b2Draw* debugDraw);
83 void DestroyBody(
b2Body* body);
92 void DestroyJoint(
b2Joint* joint);
99 void Step(
float timeStep,
100 int32 velocityIterations,
101 int32 positionIterations);
133 const b2Body* GetBodyList()
const;
139 const b2Joint* GetJointList()
const;
150 void SetAllowSleeping(
bool flag);
166 int32 GetProxyCount()
const;
169 int32 GetBodyCount()
const;
172 int32 GetJointCount()
const;
175 int32 GetContactCount()
const;
178 int32 GetTreeHeight()
const;
181 int32 GetTreeBalance()
const;
185 float GetTreeQuality()
const;
188 void SetGravity(
const b2Vec2& gravity);
191 b2Vec2 GetGravity()
const;
194 bool IsLocked()
const;
197 void SetAutoClearForces(
bool flag);
200 bool GetAutoClearForces()
const;
205 void ShiftOrigin(
const b2Vec2& newOrigin);
222 friend class b2Controller;
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;
b2ContactManager m_contactManager
const b2ContactManager & GetContactManager() const
Get the contact manager for testing.
Joint definitions are used to construct joints.
void SetGravity(const b2Vec2 &gravity)
Change the global gravity vector.
bool GetContinuousPhysics() const
This is an internal structure.
bool GetAllowSleeping() const
void SetSubStepping(bool flag)
Enable/disable single stepped continuous physics. For testing.
bool GetWarmStarting() const
Color for debug drawing. Each value has the range [0,1].
A rigid body. These are created via b2World::CreateBody.
bool IsLocked() const
Is the world locked (in the middle of a time step).
Profiling data. Times are in milliseconds.
bool GetSubStepping() const
b2Vec2 GetGravity() const
Get the global gravity vector.
int32 GetBodyCount() const
Get the number of bodies.
int32 GetJointCount() const
Get the number of joints.
int32 GetContactCount() const
Get the number of contacts (each may have 0 or more contact points).
b2Contact * GetContactList()
void SetContinuousPhysics(bool flag)
Enable/disable continuous physics. For testing.
bool GetAutoClearForces() const
Get the flag that controls automatic clearing of forces after each time step.
b2StackAllocator m_stackAllocator
An axis aligned bounding box.
b2DestructionListener * m_destructionListener
const b2Profile & GetProfile() const
Get the current profile.
b2BlockAllocator m_blockAllocator
void SetAutoClearForces(bool flag)
Set flag to control automatic clearing of forces after each time step.
void SetWarmStarting(bool flag)
Enable/disable warm starting. For testing.