Update time again!
Sadly CCD is not in yet, but there are more commands!
Changes:
Now uses Box2D v1.4.1
Get list of joints in a world
Get list of bodies in a world
Get list of contacts for a body
Get list of joints for a body
Renamed b2GetContactCount to b2GetWorldContactCount
Renamed b2GetCount to b2GetWorldContact
Lists of joints/contacts for a body are contained in nodes.
Here is some example code showing how to loop through all the contacts in the body 'MyBody':
ContactNode = b2GetBodyFirstContactNode(MyBody)
while ContactNode
CurrentContact = b2GetContactNodeContact(ContactNode)
rem <insert code to use 'CurrentContact'>
ContactNode = b2GetNextContactNode(ContactNode)
endwhile
And here is the equivalent for joints:
JointNode = b2GetBodyFirstJointNode(MyBody)
while JointNode
CurrentJoint = b2GetJointNodeJoint(ContactNode)
rem <insert code to use 'CurrentJoint'>
JointNode = b2GetNextJointNode(JointNode)
endwhile
Both of those are very fast since it is just accessing internal variables, so you don't have to worry about speed as much
The new commands:
b2GetBodyFirstContactNode(int BodyID)
b2GetNextContactNode(int ContactNodeID)
b2GetPreviousContactNode(int ContactNodeID)
b2GetContactNodeContact(int ContactNodeID)
b2GetWorldBodyCount(int ID)
b2GetWorldBody(int ID, int Index)
b2GetWorldJointCount(int ID)
b2GetWorldJoint(int ID, int Index)
b2GetBodyFirstJointNode(int BodyID)
b2GetNextJointNode(int JointNodeID)
b2GetPreviousJointNode(int JointNodeID)
b2GetJointNodeBody(int JointNodeID)
b2GetJointNodeJoint(int JointNodeID)
There are now over 100 commands in the plugin
Download
HERE