Add a controller to the world list.
Controller to add.
Controller that was added to the world.
Creates a new controller.
New controller.
New controller.
Create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies to cease colliding.
Joint definition.
New created joint.
Destroy a controller given the controller instance.
Controller to destroy.
Query the world for all fixtures that precisely overlap the provided transformed shape.
A user implemented callback class. It should match signature function Callback(fixture:b2Fixture):Boolean. Return true to continue to the next fixture.
The query shape.
Optional
transform: b2TransformOptional transform, default = null.
Ray-cast the world for all fixtures in the path of the ray. Your callback Controls whether you get the closest point, any point, or n-points The ray-cast ignores shapes that contain the starting point.
A callback function which must be of signature: function Callback( fixture:b2Fixture, // The fixture hit by the ray point:b2Vec2, // The point of initial intersection normal:b2Vec2, // The normal vector at the point of intersection fraction:Number // The fractional length along the ray of the intersection ):Number Callback should return the new length of the ray as a fraction of the original length. By returning 0, you immediately terminate. By returning 1, you continue wiht the original ray. By returning the current fraction, you proceed to find the closest point.
The ray starting point.
The ray ending point.
Removes the controller from the world.
Controller to remove.
Use the given object as a broadphase. The old broadphase will not be cleanly emptied.
Register a contact filter to provide specific control over collision. Otherwise the default filter is used (b2_defaultFilter).
Contact filter'er.
Register a contact event listener.
Contact event listener.
Register a routine for debug drawing. The debug draw functions are called inside the b2World::Step method, so make sure your renderer is ready to consume draw commands when you call Step().
Debug drawing instance.
Destruct the world. All physics entities are destroyed and all heap memory is released.
Destruction listener instance.
Take a time step. This performs collision detection, integration, and constraint solution.
The amout of time to simulate, this should not vary.
For the velocity constraint solver.
For the position constraint solver.
The world class manages all physics entities, dynamic simulation, and asynchronous queries.